Skip to content

Commit 2d0a6df

Browse files
committed
fix: Avoid destroying child wrappers
1 parent 7064ab0 commit 2d0a6df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/test-utils/src/auto-destroy.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export function enableAutoDestroy(hook: (() => void) => void) {
1414

1515
hook(() => {
1616
wrapperInstances.forEach((wrapper: Wrapper) => {
17+
// skip child wrappers created by wrapper.find()
18+
if (wrapper.selector) return
19+
1720
wrapper.destroy()
1821
})
1922
wrapperInstances = []

0 commit comments

Comments
 (0)