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
This commit was merged in pull request #774.
This commit is contained in:
1 parent
b77b04b714
commit
3a8b309d7e
4 files changed
+45
-3
No files matched your search
+7
-2
@@ -135,9 +135,14 @@ module.exports = [
|
||||
},
|
||||
},
|
||||
|
||||
// Unit tests, and the helpers they require: jest on node.
|
||||
// Unit tests, the helpers they require, and the test files they hand to
|
||||
// jest: jest on node.
|
||||
{
|
||||
files: ["tests/**/*.test.js", "tests/support/**/*.js"],
|
||||
files: [
|
||||
"tests/**/*.test.js",
|
||||
"tests/support/**/*.js",
|
||||
"tests/fixtures/**/*.js",
|
||||
],
|
||||
languageOptions: {
|
||||
...commonjs,
|
||||
globals: { ...globals.node, ...globals.jest },
|
||||
|
||||
Reference in new issue
Block a user