Repository navigation
Commit 3cb2ead
fix(frontend): disable Node's native localStorage global in vitest workers
The Node 26.x leg added in the previous commit failed CI: Node >=25
enables a native `localStorage` global by default (nodejs/node#57666),
which throws a DOMException without --localstorage-file and shadows
jsdom's own window.localStorage before vitest-environment-jsdom can
install it. Every test touching localStorage saw it as undefined
(WhatsNewModal.test.tsx, page.test.tsx's BITB-029 case), while 22.x
was unaffected since the global is opt-in-only before Node 25.
Pass --no-experimental-webstorage to vitest's worker processes via
the now-flat `execArgv` option (Vitest 4 removed the old
`poolOptions.threads/forks.execArgv` nesting) so jsdom's localStorage
wins again. Verified 773/773 unit tests, lint, and type-check pass
locally with the flag applied; confirmed via Node's own changelog
that the flag was introduced alongside --experimental-webstorage in
v22.4.0, so it's a recognized no-op on the 22.x leg too.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NQfpC1H5MQRgQWuTfyWSMp1 parent 2aace26 commit 3cb2ead
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
0 commit comments