You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two tests to test dispatching a event on a dom with jsdom:
use default Event to instantiate a click event
use Event from window object created by jsdom to instantiate a click event
First test failed because of TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'. and second passed.
It seems the jsdom is not correctly provided for test environment.
Describe the bug
I have two tests to test dispatching a event on a dom with jsdom:
First test failed because of
TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
and second passed.It seems the jsdom is not correctly provided for test environment.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-8arlh8?file=package.json&initialPath=__vitest__
It works in the repro within StackBlitz, but it always fails locally.
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: