Skip to content

fixture.destroy() not called in cleanup #240

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

Closed
Lukas-Kullmann opened this issue Jul 30, 2021 · 2 comments · Fixed by #241
Closed

fixture.destroy() not called in cleanup #240

Lukas-Kullmann opened this issue Jul 30, 2021 · 2 comments · Fixed by #241
Labels

Comments

@Lukas-Kullmann
Copy link
Contributor

Hey there, I ran into an issue that I could fix by calling fixture.destroy() at the end of my test. The details are not really important here.

Apparently, the cleanup function in projects/testing-library/src/lib/testing-library.ts only removes the elements from the dom. It does not destroy the fixture.

Is there a reason for that? I think destroying the fixture at the end of each test is a good idea since it also destroys the components which might free quite some memory in most cases. And I can also not think of any use case where you would not want to destroy the fixture at the end of a test.

@timdeschryver
Copy link
Member

I think this is a good idea!
If you want, you can create a Pull Request.

@github-actions
Copy link

🎉 This issue has been resolved in version 10.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants