mocha.opts timeout code example
Example 1: mocha timeout
describe("testing promises", function () {
this.timeout(5000);
});
Example 2: mocha js
Mocha is a JavaScript test framework!
var assert = require('assert');
describe('Array', function () {
describe('#indexOf()', function () {
it('should return -1 when the value is not present', function () {
assert.equal([1, 2, 3].indexOf(4), -1);
});
});
});