-
-
Notifications
You must be signed in to change notification settings - Fork 278
Description
Describe the bug
The probject experiences strange issues with Node 25. The testing environment throws an assertion and when using happy-dom as a testing environment the localStorage is an empty object.
To Reproduce
Steps to reproduce the behavior in relationship to the project itself:
- Install and use Node 25 (
nvmcan be handy) - Clone the repo
npm installnpm run test
Expected behavior
Tests run and pass. This works flawlessly with Node 24.
To Reproduce (2)
Steps to reproduce the (probably related) issue about localStorage from an external project:
- Install and use Node 25
- Create a dummy project installing vitest and happy-dom
- Create the following test file:
// @vitest-environment happy-dom import { describe,it } from 'vitest'; describe("test", () => { it("breaks localStorage", () => { window.localStorage.getItem("hello"); }) })
- Run
npx vitest
Expected behavior
Tests run and pass, works with Node 24
Screenshots
Device:
- OS: Arch Linux
- Node 25.1.0
Additional context
I cannot be sure the two noticed behavior are directly correlated, I only supposed so. If you realize the two problems are separated issues just let me know and I will split this specific issue in two.
