-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
Description
Environment
I got this on my project, but was able to reproduce it on the stackblitz starter. Here's the info from there:
Working directory: /home/projects/github-rg6uhsqu nuxi 15:08:38
Nuxt project info: nuxi 15:08:38
------------------------------
- Operating System: Linux
- Node Version: v20.19.1
- Nuxt Version: 4.0.1
- CLI Version: 3.26.4
- Nitro Version: 2.12.4
- Package Manager: npm@10.8.2
- Builder: -
- User Config: devtools, compatibilityDate
- Runtime Modules: -
- Build Modules: -
------------------------------
Reproduction
Reproduction: https://stackblitz.com/edit/github-rg6uhsqu?file=components%2Ftests%2FMyComponent.spec.ts
- Run
npm run test
- See that the
console.log
from the watcher triggers both from Component 1 and Component 2; even though the state is only changed in the second test - Unmounting the first wrapper within it's
it
block fixes the issue
Describe the bug
It seems that wrappers do not unmount automatically after their it statements. I'm not sure if this is expected behaviour, but I wouldn't expect it and I'm worried that it can cause some data-contamination between tests and cause memory leaks?
Additional context
No response
Logs
MikeBellika