WHITECOLOR WHITECOLOR - 11 months ago 41
Javascript Question

JS unit testing: run tests on file changes (like nodemon)

I have two question on JS unit testing:

1) Is there some tool that allows to automaticaly run javascript unit tests when certain files are changed (like for example nodemon restarts node.js on js changes).

2) Is this strategy appropriate (efficient) way to run unit tests?


Answer Source

Check out grunt build system and the watch task. You can setup grunt to watch for file changes and then run any tasks you want (test, lint, compile, etc...).


Some of the ideas are covered in this tutorial. http://javascriptplayground.com/blog/2012/04/grunt-js-command-line-tutorial

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download