-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Tests with jsdom/react don't seem to exit #140
Comments
Found another repro https://github.com/tommywalkie/uvu-jsdom-node-16-repro/tree/c5005cd6520ba27a334836bb862ba4307e719455 linked to #124 (comment) The suggested fix works test.after(() => {
setTimeout(() => {
process.exit(0)
}, 500)
}) |
See #91 and #124 for related items. This means something isn't exiting itself (likely your jsdom hook) and uvu waits for everything to close before it exits.. since that's part of the testing responsibility. If you look at the included svelte/Preact examples, there's a setup and teardown helper called for each suite, which is controlling the jsdom lifecycle to make sure it's not lingering. |
In this case, it looks like the cause is the |
@DavidWells Did you ever get to the bottom of the issue in @testing-library/react? |
Trying to use
uvu
+@testing-library/react
for some fast tests 😃However, it seems that
uvu
never exits once the tests are complete.Here is a repro repo: https://github.com/DavidWells/uvu-jsdom-error-repro
If I comment out the component test https://github.com/DavidWells/uvu-jsdom-error-repro/blob/master/src/__tests__/index.js#L10-L27 uvu returns as expected.
Any ideas on how to fix this?
Thanks for the great lib as always ❤️
Running this in node v16.6.1 if that helps
The text was updated successfully, but these errors were encountered: