npm mocha --timeout code example
Example 1: mocha timeout
describe("testing promises", function () {
this.timeout(5000);
});
Example 2: how to run mocha tests form a file
$ mocha -g 'logs a'
describe("testing promises", function () {
this.timeout(5000);
});
$ mocha -g 'logs a'