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
8 lines
300 B
JavaScript
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);
|
|
});
|