From e7fd0563e1e6b14ca9d346cf23606948d36c256f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 21 Apr 2022 23:20:05 +0000 Subject: [PATCH] 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. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e6a49d25..687a035c 100644 --- a/package.json +++ b/package.json @@ -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",