Commit 82b4fd1
committed
test: lower the mock.module live-exports cutoff from Node 26 to Node 24
The previous fix split per Node major: `namedExports` for < 26,
getter-backed `exports` for >= 26. Node 24's CI leg then failed
because Node 24 *also* snapshots `namedExports` (the option is
deprecated there too — only Node 22 still reads it live).
A probe on Node 24.15.0:
| Option | Behavior on Node 22 | 24 | 26 |
| -------------------------- | ------------------- | -- | -- |
| `namedExports` (live wrap) | LIVE | snapshot | (deprecated/snapshot) |
| `exports` (plain spread) | option ignored | snapshot | snapshot |
| `exports` (getter wrap) | option ignored | LIVE | LIVE |
So the cutoff is *Node 22 only* for `namedExports`; Node 24+ has to
use the getter-backed `exports` form. Lower the version branch to
`NODE_MAJOR < 24` accordingly.
Verified on Node 22.22.2, 24.15.0, 26.1.0: 1158 pass / 0 fail / 0
skipped each.
https://claude.ai/code/session_01XWs5VsKDPMo38kskxHoiRM1 parent 663ff4f commit 82b4fd1
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
| 91 | + | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
0 commit comments