Commit efe7181
committed
test(lint): give the lazy-deps dist probes the same cold-load timeout as their sibling (#3662)
The two dist probes spawn a child `node` that cold-loads sucrase (~1.5 MB) and
typescript (~9 MB) to prove neither comes in at import time. That cold load alone
exceeds vitest's default 5s timeout on a loaded runner — a whole-repo `pnpm test`
with dozens of parallel turbo tasks — so the ESM probe was observed failing at
5928ms on `execFileSync`. The failure is pure latency: the assertions only check
which deps ended up in the child's require cache.
The in-process sibling already knew this and carried an explicit 30s timeout. Hoist
that rationale into a single named `COLD_LOAD_TIMEOUT_MS` and apply it to all three
cold-loading cases, so the contract is stated once instead of drifting per case.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G71ANZMJ6TgX2a4WQVHmpr1 parent 6169615 commit efe7181
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
88 | | - | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| |||
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
104 | | - | |
| 110 | + | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| |||
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 138 | + | |
136 | 139 | | |
0 commit comments