Repository navigation
Description
What happens?
On Node.js 26, a clean clone of dev passes npm run typecheck and npm run build, but
npm test fails 100 of 602 tests across 9 files. The first failure of each affected file is:
TypeError: Cannot read properties of undefined (reading 'clear')
❯ tests/sticky-group-head.spec.ts:29:16
npm test reports:
Test Files 9 failed | 36 passed (45)
Tests 100 failed | 502 passed (602)
CI (Node 22) is green, so the breakage is invisible upstream. Any contributor building from
source on a current Node release hits it and may believe they broke something.
How to reproduce
git clone https://github.com/cloader/dsh-taskboard.git
cd dsh-taskboard
npm ci
node --version # v26.13.0
npm test # 100 failed / 602Workaround (confirms the cause, not a project-code defect):
NODE_OPTIONS=--no-experimental-webstorage npm test # 45 files / 602 tests passWhy
- Node 26 exposes an experimental
localStorageglobal. Without--localstorage-fileit is
undefinedand accessing it prints
ExperimentalWarning: localStorage is not available because --localstorage-file was not provided. - Vitest 3.2.7 (the version the lockfile installs) only copies jsdom window properties onto
globalThisfor names that are still free:populateGlobal'sgetWindowKeys()keeps a key
only when it is absent from the global object. So on Node 26 the barelocalStorageused by
the tests resolves to Node's undefined getter instead of jsdom'sStorage. - jsdom's real window is still reachable: Vitest sets
dom.window.jsdom = dom, and thejsdom
key is copied to the global object, soglobalThis.jsdom.window.localStorageworks.
This is test infrastructure only — the plugin itself is unaffected.
Proposed fix
Add vitest.config.ts with a small setup file (tests/setup-storage.ts) that, when
globalThis.jsdom?.window exists, re-defines localStorage / sessionStorage on globalThis
from the jsdom window. On Node 22 the global is not defined, so the setup is a no-op and CI keeps
passing unchanged.
I have this working locally on Node 26.13 (Windows 11): 45 files / 602 tests pass,
npm run typecheck and npm run build are clean. The patch is two small files
(vitest.config.ts + tests/setup-storage.ts); I can open a PR for it if you want the fix.
Environment
- dsh-taskboard:
0.9.7/devatfb97e7f(also reproduced on0.9.6@3054eba) - DSH:
0.2.1-rc.2 - OS: Windows 11
- Node:
v26.13.0, npm11.20.0 - Vitest:
3.2.7, jsdom25.0.1
Additional context
An optional follow-up would be to run CI on a second Node line (for example 22 + 26 or 24) so
this class of breakage surfaces on the PR instead of in a contributor's terminal. I'm not
including that in the fix PR to keep it one concern.
Activity
cloader commentedon Nov 1, 2026
Thanks for reporting this and documenting the Node 26 workaround. Closing this issue for now.
For clarity, PR #75 reports that all 603 tests passed on Node 26.13, and its description explicitly notes that the suite additionally needs the jsdom
localStoragesetup discussed in this issue. That setup is not included in the merged changes: #75 fixes the separate import-preview race tracked in #72.This issue is therefore closed as not planned, rather than marked as fixed by #75.
cloader commentedon Nov 1, 2026
A fix is now available in #78, targeting
dev.The failure was reproduced on Node 26.13.0. The fix makes jsdom test suites use their own
localStorageandsessionStorage, restoring the original globals after each suite. Both new regression tests fail without the setup and pass with it.Typecheck, build, and all 47 test files / 605 tests pass locally on Windows with Node 22.23.1 and Node 26.13.0. GitHub CI also passes on both Node 22 and Node 26, which is now included in the CI matrix. No Web Storage flags or external setup are required.
This issue is open while the fix awaits merge.