-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
When container
is document
, cleanup steps fails with "TypeError: Cannot read properties of null (reading 'removeChild')"
#1329
Comments
@quisido Can you please add a reproduction for this? As long as a document exists, JSDOM implicitly creates |
Are you unable to reproduce it? I've hit this in two separate projects just by setting container to document. As far as I'm aware, using |
Two points here:
|
@MatanBobi Running into same issue as described here. Here is reproducible example (clone from your StackBlitz but switched from vitest to jest): https://stackblitz.com/edit/stackblitz-starters-3sze3m?file=app%2Flayout.spec.tsx |
@m-zuro Thanks.
So I think there's a misconfiguration there. |
@MatanBobi sorry, copy/paste job. Updated now, can you re try pls?
|
Sorry it took me a while @m-zuro. This error is odd to me, the only place we're calling
When I run this test locally in our repo, it passes. I'm trying to understand if there's anything different here. |
Just opening this for tracking with the associated PR: #1330 .
When:
(Untested: This bug may require that
Component
render a<body>
element.)Then:
Because:
If we first check that
document.body
is not null, then this error will not occur.The text was updated successfully, but these errors were encountered: