Files
copilotkit__copilotkit/packages/web-inspector/vitest.setup.ts
Jordan Ritter 3e0a6a0d85 fix(web-inspector): shim localStorage in vitest setup for Node 25 compatibility
Node 25 ships an experimental built-in localStorage global accessor that
shadows jsdom's mock, leaving window.localStorage as an empty stub with
no clear/setItem/removeItem/getItem methods. This broke all 22 telemetry
tests with 'window.localStorage.clear is not a function' and was
blocking pre-commit hooks repo-wide.

Add a vitest setup file that installs a proper in-memory Storage shim
on both globalThis and window before each test, so jsdom-environment
tests behave the same on Node 20 and Node 25.
2026-05-27 12:49:08 -07:00

2.7 KiB