-
Notifications
You must be signed in to change notification settings - Fork 723
Add Vitest cleanup hint to react-testing-library setup docs #1422
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
Add Vitest cleanup hint to react-testing-library setup docs #1422
Conversation
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should explain how to build auto-cleanup by yourself i.e. what do you do if you don't want to enable globals
I had a crack at documenting how to get it working without enabling globals. Let me know what you think. |
Just following up to ask if there's anything else needed to progress this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@all-contributors please add @ezzatron for docs :) |
I've put up a pull request to add @ezzatron! 🎉 |
This PR adds a heading to the setup guide for
react-testing-library
that explains how to get auto-cleanup working when using Vitest. The wording was inspired by a similar heading in thevue-testing-library
setup guide: https://testing-library.com/docs/vue-testing-library/setup/#vitest