Node 26 defines its own `localStorage` accessor on the global object, which returns `undefined` unless the process was started with `--localstorage-file` (hence the "localStorage is not available because --localstorage-file was not provided" warning now printed by every worker). In the jsdom environment `globalThis` IS the window, so that accessor shadows jsdom's Storage and every `localStorage.getItem(...)` in a test throws "Cannot read properties of undefined". CI caught this on the Node 26 bump: `check:test:ui` failed with 22 errors across session.test.ts, terminals.test.ts, model-settings and onboarding stores — all storage-backed. Reproduced locally against nodejs_26 (12 failures in src/store/session.test.ts alone) before fixing. vitest.setup.ts now installs a real in-memory Storage on both globalThis and window when the global resolves to undefined, before any test module reads it. Guarded on `typeof === 'undefined'` so Node < 26 and any future runtime that provides a working Storage keep jsdom's own implementation. Verified under nodejs_26: the full `--project ui` lane is 378 files / 3268 tests green (was 22 failures). |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||