Files
AutistMask/tests/fixtures/leavesIntervalRunning.js
T
sneak 08adee9b01
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
test: replace jest workers past 200 MB so they exit in time (closes #766)
On a starved CPU, jest force-stopped worker processes that could not exit
within the 500 ms it allows, and script/lib/jest.js failed the run although
every test passed. No test leaks a handle; exit time grows with what a
worker holds, 380 to 970 MB at the end of the run.

workerIdleMemoryLimit in package.json replaces a worker whose heap is over
200 MB after a test file with a fresh one.

tests/jestRunner.test.js runs script/lib/jest.js on a fixture that leaves
an interval running and expects the force-stop to fail the run.

Model: opus-5-5
2026-11-11 07:11:07 +00:00

8 lines
300 B
JavaScript

// A test file that starts an interval and never clears it.
// tests/jestRunner.test.js runs script/lib/jest.js on this file alone. The
// name does not end in .test.js, so the normal run never picks it up.
test("starts an interval and never clears it", () => {
setInterval(() => {}, 1000);
});