Skip to content

Commit

Permalink
chore: increase test timeouts to avoid flaky tests
Browse files Browse the repository at this point in the history
mocha defaults to a 2000ms timeout, which frequently causes CI to fail.
Since such short timeouts are pretty much useless, vastly increase the
timeout to one minute per test.
  • Loading branch information
tniessen committed Apr 21, 2022
1 parent 649a3b0 commit e7fd056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"scripts": {
"test": "npm run test-unit && npm run lint",
"test-unit": "mocha test/unit/*.test.js",
"test-all": "mocha test/**/*.test.js",
"test-unit": "mocha --timeout 60000 test/unit/*.test.js",
"test-all": "mocha --timeout 60000 test/**/*.test.js",
"coverage": "c8 --reporter=html --reporter=text --reporter=text-summary npm test",
"coverage-all": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test-all",
"lint": "eslint . --cache",
Expand Down

0 comments on commit e7fd056

Please sign in to comment.