test(cli): cache subprocess compilation within each worker
This commit is contained in:
+10
-3
@@ -983,9 +983,16 @@ runner. Preserve simultaneous launches where concurrency is itself under test.
|
||||
Build/documentation writers hold checkout-local output locks. Tests do not
|
||||
hold a broad command lock; `check:pr` finishes tests before document validation.
|
||||
|
||||
Vitest and Node persistent compile caches are deliberately not enabled by
|
||||
default. To evaluate repeated local runs, opt in for both cold and warm
|
||||
measurements with an isolated cache:
|
||||
Vitest's persistent compile cache remains disabled. The `cliTest` fixture shares
|
||||
a temporary Node compile cache among its fresh CLI subprocesses. The worker
|
||||
removes it after test-scoped processes finish. Explicit child environment
|
||||
settings take precedence; children requesting `NODE_V8_COVERAGE` do not receive
|
||||
the fixture cache. These subprocesses are outside aggregate Vitest coverage;
|
||||
subprocess coverage attachment remains disabled. Cold-start import checks launch
|
||||
independently without this fixture cache.
|
||||
|
||||
To evaluate persistent compile caching for repeated local runs, opt in for both
|
||||
cold and warm measurements with an isolated cache:
|
||||
|
||||
```bash
|
||||
NODE_COMPILE_CACHE=.cache/node-compile npm test
|
||||
|
||||
Reference in New Issue
Block a user