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
Testing a component that contains a form with Vitest and React Testing Library in a Next project leads to a submit event that doesn't contain the input elements that are part of the form itself.
Describe the bug
Testing a component that contains a form with Vitest and React Testing Library in a Next project leads to a submit event that doesn't contain the input elements that are part of the form itself.
Reproduction
I recreated the issue with a minimal example here
If you try to interact with the form from the ui preview you should see the input field content be printed to the console.
If you try to run
npm run test
you'll see an error becauseevent.currentTarget
doesn't contain an element called "field".System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: