Wednesday, 1 February 2017

sails mocha: Running specific tests in mocha

To avoid running the entire test suite (when writing the tests), you can choose to only run specific tests based on a matching regular expresssion eg:

given snippet of packages file:

    "test": "PORT=9998 NODE_ENV=test mocha -R spec -b --recursive"


npm test --  --grep ManageSessions

will run any of the tests with a describe title matching *ManageSessions*

No comments:

Post a Comment