Skip to content

Commit 7d57432

Browse files
committed
chore: use fresh containers for app mount tests
1 parent 1ef8f46 commit 7d57432

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/runtime-dom/__tests__/customElement.spec.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ describe('defineCustomElement', () => {
104104
},
105105
})
106106
const app = createApp(containerComp)
107+
const container = document.createElement('div')
108+
document.body.appendChild(container)
107109
app.mount(container)
108110
const myInputEl = container.querySelector('my-el-input')!
109111
const inputEl = myInputEl.shadowRoot!.querySelector('input')!
@@ -115,7 +117,6 @@ describe('defineCustomElement', () => {
115117
myInputEl.removeAttribute('value')
116118
await nextTick()
117119
expect(inputEl.value).toBe('')
118-
app.unmount()
119120
})
120121

121122
test('should not unmount on move', async () => {
@@ -1188,6 +1189,8 @@ describe('defineCustomElement', () => {
11881189
},
11891190
}),
11901191
)
1192+
const container = document.createElement('div')
1193+
document.body.appendChild(container)
11911194
createApp({
11921195
render() {
11931196
return h('div', [

0 commit comments

Comments
 (0)