This is an example project that shows you how you can use modules such as nodeunit in conjunction with node-dev to do local on the fly unit testing to help with TDD development.
I've wrapped up the functionality within a Express project to show how it can be used within one of the NodeJS frameworks.
Modules used:
- Express Visual Framework
- Jade Template engine that Express uses out of the box
- Commander Enables the ability to pass in command line arguments
- klass Simple class structure
- node-dev Development flavor of Node that restarts the app upon file save
- nodeunit Unit Testing framework
To get started simply run the following command once you've download the code:
node-dev app -t
The option -t tells the application to run all the unit tests within the /tests folder upon every save.