In this blog, we will discuss how to use mocha testing framework for testing sails application.
To install mocha with npm globally
$ npm install –global mocha
$ npm install mocha –save
you can run mocha test cases using the following command-
Before writing the test case create test/ directory in your project.
The syntax for design test case-