Some simple exercises in Node.js to get to know the CommonJS module system used in Node.js a bit better. Uses the Mocha test framework with the Should vocabulary.
Currently all the tests in this repository are failing. Your objective is to get them all passing, without editing the test file.
Currently there are 7 tests related to different concepts in the Node.js module system. They are ordered in the test/test.js
file by approximate difficulty from top to bottom.
If want to check your solutions (or cheat) you can checkout the answer_key git branch of the repo.
If you haven't yet, install Node.js.
Then clone or download the latest version of this repository from GitHub.
The actual setup is pretty simple. Assuming you have Node.js installed, just run this command in your console from within this directory:
npm install
You should see a bunch of green and white text fly by the screen.
To run the tests any time, run this command:
npm test
Like falling off a log. Enjoy!
Written in 2014 by Kris Walker [email protected] (http://www.kixx.name/). Available in the Public Domain, free in every way you could imagine.