If we have mocha configured, we can run tests using grunt mocha / mochaTest. What if we want to run different configurations ex. integration tests / smoke tests / unit tests etc.
Below is sample code which shows mochaTest configuration.
We can run tests using grunt mochaTest
What if, we want to add new tests and want to run them separately? We can use new targets and add files you want to run corresponding to that.
and then we can run unit test using following command
We can run smoke test using following command
and integration test using below command
To run all tests together, run below command
Hope it helps!