Commit 5f4f3fa
authored
build(config): regenerate config before unit tests so runs are hermetic (#4432)
test:unit / test:unit:coverage / test:watch (and thus test, test:coverage) did
not regenerate src/config/index.js first, so a run consumed whatever config the
last dev/build/e2e wrote. When that file was generated under a different NODE_ENV,
config keys that only exist under a project-specific env were absent, producing
confusing non-deterministic failures (undefined config values -> bad URLs /
ECONNREFUSED that read like broken tests).
Add pretest:unit / pretest:unit:coverage / pretest:watch hooks that run
generateConfig, respecting the current NODE_ENV. generateConfig already skips the
write when content is byte-identical, so watch mode and concurrent workers are
not disrupted.
Closes #4424
Claude-Session: https://claude.ai/code/session_01XioM62H2iEMLsr686minjn1 parent 5d88766 commit 5f4f3fa
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
0 commit comments