This project provides a simple, automated environment for experimenting with test-driven JavaScript development. It’s perfect when you need a no fuss setup to do things like code kata!
- Make sure you’ve installed Node.
- Install the Grunt command line tool globally by running
> sudo npm install grunt-cli
- Clone this repository or download the ZIP.
- From a command prompt, navigate to the root of the repository.
- Run
> sudo npm install
to automatically install the project's dependencies.
Add your own JavaScript files to the src/
directory. Add your own test specs to the test/specs/
directory. See src/myApp.js and test/specs/myApp.spec.js for guidance on how to structure your source code and unit test code.
To run your tests, type > grunt test:live
This will automatically detect your files in the src/
and test/specs/
directories and launch a live test runner in your default browser. Just leave the browser open while you work. It will automatically refresh and re-run your tests anytime you edit either your source files or your spec files!
If you’d rather do a one-time test run, use > grunt test
instead.
This project uses Mocha as the testing framework and includes the Chai assertion & matcher library.