Skip to content

testing-library/react fireEvent is not working with happy-dom #1770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JakobJingleheimer opened this issue Mar 10, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@JakobJingleheimer
Copy link

Describe the bug

Whilst porting from JSDom to HappyDOM, I have a couple seemingly random instances of test cases erroneously failing. The issue seems to be related to fireEvent (from @testing-library/react). In JSDom and browsers (Chrome & Firefox), the behaviour the tests assert is as expected.

To Reproduce

You can observe the breakage between 689cccc (good) and da4a7ce (bad - only change is jsdom → happy-dom).

Expected behavior

DOM is updated correctly

Device:

  • OS: macOS 14.7.4
  • Browser: node 23.9.0
  • Version: @happy-dom/global-registrator@17.4.3

Additional context
Add any other context about the problem here.

@JakobJingleheimer JakobJingleheimer added the bug Something isn't working label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant