Skip to content

Commit 10d01c3

Browse files
author
Eric Wheeler
committed
test: limit Jest worker count to 40% per suite
- Each test suite (extension/webview) limited to 40% CPU usage - Total CPU utilization capped at 80% (40% x 2 suites) - Reserves 20% CPU for system and user tasks - Prevents memory thrashing and system slowdown - Reduces risk of OOM kills on memory-constrained systems - Maintains smooth UI responsiveness during test runs - Improves test reliability while keeping parallel execution Signed-off-by: Eric Wheeler <[email protected]>
1 parent 648c6e7 commit 10d01c3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@
370370
"pretest": "npm run compile",
371371
"dev": "cd webview-ui && npm run dev",
372372
"test": "node scripts/run-tests.js",
373-
"test:extension": "jest",
373+
"test:extension": "jest -w=40%",
374374
"test:webview": "cd webview-ui && npm run test",
375375
"prepare": "husky",
376376
"publish:marketplace": "vsce publish && ovsx publish",

webview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"lint": "eslint src/**/*.ts src/**/*.tsx",
88
"lint-fix": "eslint src/**/*.ts src/**/*.tsx --fix",
99
"check-types": "tsc",
10-
"test": "jest",
10+
"test": "jest -w=40%",
1111
"dev": "vite",
1212
"tsc": "tsc -b",
1313
"vite-build": "vite build",

0 commit comments

Comments
 (0)