For async tests and hooks, ensure “done()” is called; if returning a Promise, ensure it resolves

I know an ugly way of doing it, just by increasing default timeout of Mocha from 2 seconds to 10 seconds this can be done by adding a flag --timeout 10000 in the test scripts i.e –

package.json

 "scripts": {
    "start": "SET NODE_ENV=dev && node server.js",
    "test": "mocha --timeout 10000"
  }

Leave a Comment