Saturday, August 29, 2015

[Node JS] Test specific files with Mocha

This is a handy command line I use for testing specific files while developing a certain module for a faster test. I just call Mocha, (optionally) specify my preferred terminal reporter, then I call the files to go through:

mocha --reporter spec ./test/modules/abc.js ./test/modules/def.js

That's it. It is that simple. This way I can run tests on specific files and save some time.

No comments:

Post a Comment