If we have a unit test file my-spec.js and running with mocha:
mocha my-spec.js
The default timeout will be 2000 ms. It can be overwritten
Just adding to the correct answer you can set the timeout with the arrow function like this:
it('Some test', () => { }).timeout(5000)