Skip to content

Commit e7fd056

Browse files
committed
chore: increase test timeouts to avoid flaky tests
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.
1 parent 649a3b0 commit e7fd056

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
},
1313
"scripts": {
1414
"test": "npm run test-unit && npm run lint",
15-
"test-unit": "mocha test/unit/*.test.js",
16-
"test-all": "mocha test/**/*.test.js",
15+
"test-unit": "mocha --timeout 60000 test/unit/*.test.js",
16+
"test-all": "mocha --timeout 60000 test/**/*.test.js",
1717
"coverage": "c8 --reporter=html --reporter=text --reporter=text-summary npm test",
1818
"coverage-all": "c8 --reporter=lcov --reporter=text --reporter=text-summary npm run test-all",
1919
"lint": "eslint . --cache",

0 commit comments

Comments
 (0)