Skip to content

Add a way to clean up userEvent after a test #1280

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
brynshanahan opened this issue Mar 24, 2025 · 0 comments · May be fixed by #1270
Open

Add a way to clean up userEvent after a test #1280

brynshanahan opened this issue Mar 24, 2025 · 0 comments · May be fixed by #1270
Labels
enhancement New feature or request

Comments

@brynshanahan
Copy link

Problem description

Introducing testing-library/user-event into a single test has started causing some unrelated tests to fail in another part of the codebase (tests dealing with focus specifically)

Suggested solution

It would be great if I could call userEvent.setup() in my test and then have a user.destroy() or userEvent.destroy() method to call after the test is complete

Additional context

No response

@brynshanahan brynshanahan added enhancement New feature or request needs assessment This needs to be looked at by a team member labels Mar 24, 2025
@ph-fritsche ph-fritsche removed the needs assessment This needs to be looked at by a team member label Mar 25, 2025
@ph-fritsche ph-fritsche linked a pull request Mar 25, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants