Commit 9d52f94
perf(test): run the
Follow-up to #2644. With `isolate: true` every test file re-executes its
module graph in a fresh registry; that is required for the `dom` projects
(they leak ComponentRegistry overrides and happy-dom nodes across files)
but not for `unit`, which is node-env pure logic with no such shared
mutable state.
Relaxing isolation just for `unit` lets the worker share one module graph
across its files. Measured 3.2x faster for the project in isolation
(38s -> 12s), which is a real speedup for local `vitest run --project
unit` and watch-mode logic TDD. Full-suite / CI wall barely moves (the
`dom` project gates it and runs concurrently), so this is a developer-
experience win, not a CI one — the CI win needs the DOM hermeticity work
tracked separately.
Verified hermetic, not luckily-ordered: 241 files / 3215 tests stay green
across a plain run plus three `--sequence.shuffle` seeds (1, 42, 98765),
and the full suite is unchanged at 566 files / 6894 tests.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>unit project with isolate:false (#2647)1 parent 0fc8935 commit 9d52f94
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| |||
0 commit comments