test: run jest in one process, fail on an open handle (closes #766)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

Jest force-stopped worker processes that could not exit within 500 ms on
a starved CPU, failing runs where every test passed. The test scripts now
pass --runInBand. script/lib/jest.js fails the run at once when jest
warns that it did not exit one second after the run, instead of
hanging. The Dockerfile test stage drops its 90-second timeout.

tests/jestRunner.test.js runs the runner on a fixture that leaves an
interval running and expects exit status 1.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-11 05:21:01 +00:00
1 parent d909567ab9
commit 4cb61d1a10
7 files changed
+72 -39

No files matched your search

+6 -5
View File
@@ -1761,8 +1761,8 @@ The `Makefile` targets are thin shims over `script/`:
`package.json`.
- `script/setup`: `script/bootstrap`, then the git pre-commit hook.
- `script/test`: build the `test` stage of the `Dockerfile` with `--no-cache`.
The stage runs the jest suite, stopped at 90 seconds and rerun verbose on
failure, then `script/test-verify-build`.
The stage runs the jest suite, rerun verbose on failure, then
`script/test-verify-build`.
- `script/lint`: build the `lint` stage with `--no-cache`. The stage runs
ESLint, the prettier check and `script/check-censored`. Linting runs only in
Docker.
@@ -1861,9 +1861,10 @@ have left a complete, loadable debug bundle behind. `make build-debug` keeps its
### Tests
`make test` runs the jest suite in Docker. The suite must finish within 60
seconds; the test stage stops it at 90. `make check` runs the tests, the lint
stage and the formatting check.
`make test` runs the jest suite in Docker, in one process. The suite must finish
within 60 seconds. A test that leaves a timer or another open handle running
fails the run. `make check` runs the tests, the lint stage and the formatting
check.
Some unit tests pin facts stated elsewhere in this file: