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 the worker that ran
the test, 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. Jest runs inside that file's process,
so its terminal output stays the same. The file exits 1 when jest
printed that warning.

Model: opus-5-5
This commit is contained in:
2026-11-02 00:10:51 +00:00
parent acb2577fec
commit 8f4ca5c73e
3 changed files with 43 additions and 4 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 .",