test: make test fails when jest force-stops a worker (closes #711)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s

When a test leaves a timer running, jest force-stops that worker, prints
a warning, and the run still passes. Jest has no option that fails the
run instead. Both test scripts in package.json now run jest through
script/lib/jest.js. It passes jest's output through and exits 1 when
jest printed that warning.

Model: opus-5-5
This commit is contained in:
2026-11-01 23:21:46 +00:00
parent acb2577fec
commit bc9361e426
2 changed files with 35 additions and 2 deletions
+2 -2
View File
@@ -6,8 +6,8 @@
"license": "GPL-3.0",
"private": true,
"scripts": {
"test": "jest --maxWorkers=3",
"test:verbose": "jest --maxWorkers=3 --verbose",
"test": "node script/lib/jest.js --maxWorkers=3",
"test:verbose": "node script/lib/jest.js --maxWorkers=3 --verbose",
"build": "node build.js",
"lint": "eslint . && prettier --check .",
"fmt": "prettier --write .",