{{ message }}
Repository navigation
test: run the desktop unit tests on Node 25 - #5666
Merged
Merged
Conversation
Node 25 enables its Web Storage API by default. Its global localStorage shadows the one jsdom installs, and without --localstorage-file its methods are missing, so every spec that touches storage fails with 'localStorage.clear is not a function'. Pass --no-experimental-webstorage to the test workers when the running Node knows the flag; Node 20 would reject it.
3 of 6 tasks
Node 25 accepts `--no-experimental-webstorage` but only lists `--experimental-webstorage` in `allowedNodeEnvironmentFlags` (25.0.0 lists `--experimental-webstorage`, `--webstorage` and `--no-webstorage`, but not the negated experimental spelling). The guard was therefore false on that release and the flag never reached the workers, leaving the storage specs failing. Probe the positive spelling instead: Node 20 has no feature flag (so no flag is passed), and Node 22/24 list both spellings. Verified on Node 25.0.0: `pnpm test` is green without NODE_OPTIONS.
Zane-0x5a
added a commit
to Zane-0x5a/marktext
that referenced
this pull request
Oct 9, 2026
Takes upstream's Node 25 web storage probe from marktext#5666 over the fork's earlier spelling, and regenerates the lockfile from upstream's with pdfjs-dist added for the print preview.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
On Node 25,
pnpm testfails the specs inpackages/desktopthat touch storage, for example all four inexport-settings-persist.spec.ts:Node 25 enables its Web Storage API by default. The global
localStorageit defines shadows the one jsdom installs, and without--localstorage-fileit has no working methods.This passes
--no-experimental-webstorageto the Vitest workers (test.execArgv). Node 20.19, the minimum inengines, does not know the flag and would refuse to start the worker, so it is passed only whenprocess.allowedNodeEnvironmentFlagshas it. CI (Node 22 and 24) is unaffected either way.Type of change
Test plan
export-settings-persist.spec.tsfails 4 tests as above. After: the whole desktop unit suite passes (88 files, 1032 tests) without anyNODE_OPTIONS.Notes for reviewers [optional]
No screenshots: only the unit test configuration changes.
packages/muyauses happy-dom and already passes on Node 25.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
🤖 Generated with Claude Code