Hello guys,
In this blog, we will discuss how to use mocha testing framework for testing sails application.
Mocha is a javascript automated testing framework for node.js used for asynchronous testing, test coverage reports, and use of any assertion library.
To install mocha with npm globally
$ npm install –global mocha
$ npm install mocha –save
you can run mocha test cases using the following command-
$mocha file_name
Before writing the test case create test/ directory in your project.

The syntax for design test case-