chai tests code example Example 1: mocha test cases in node js example $ npm install --save mocha chai Example 2: how to run mocha tests form a file $ mocha -g 'logs a'