Commit 0efaab7
committed
fix(tests): prevent v8 coverage segfault on large codebase
Fixes segmentation fault when running `pnpm cover` by adding memory
management and processing concurrency options.
Changes:
- Hoist logger to module scope in cover.mjs to fix ReferenceError
- Use NODE_OPTIONS with --max-old-space-size=8192 for vitest coverage
- Add processingConcurrency: 1 to vitest config to prevent v8 crashes
- Add reportOnFailure: true and explicit reportsDirectory
The segfault occurred because v8 coverage was processing too much data
at once without sufficient memory. These changes allow the coverage
command to complete successfully with 2,255 tests and 196 test files.
Test Results:
- 196 test files passed
- 2,255 tests passed, 2 skipped
- Type Coverage: 98.16%
- Code Coverage: 37.17%
- Cumulative: 67.66%1 parent a55c2a5 commit 0efaab7
3 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
0 commit comments