mirror of https://github.com/vuejs/core.git
chore: use fresh containers for app mount tests
This commit is contained in:
parent
1ef8f46af0
commit
7d5743223f
|
@ -104,6 +104,8 @@ describe('defineCustomElement', () => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const app = createApp(containerComp)
|
const app = createApp(containerComp)
|
||||||
|
const container = document.createElement('div')
|
||||||
|
document.body.appendChild(container)
|
||||||
app.mount(container)
|
app.mount(container)
|
||||||
const myInputEl = container.querySelector('my-el-input')!
|
const myInputEl = container.querySelector('my-el-input')!
|
||||||
const inputEl = myInputEl.shadowRoot!.querySelector('input')!
|
const inputEl = myInputEl.shadowRoot!.querySelector('input')!
|
||||||
|
@ -115,7 +117,6 @@ describe('defineCustomElement', () => {
|
||||||
myInputEl.removeAttribute('value')
|
myInputEl.removeAttribute('value')
|
||||||
await nextTick()
|
await nextTick()
|
||||||
expect(inputEl.value).toBe('')
|
expect(inputEl.value).toBe('')
|
||||||
app.unmount()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('should not unmount on move', async () => {
|
test('should not unmount on move', async () => {
|
||||||
|
@ -1188,6 +1189,8 @@ describe('defineCustomElement', () => {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
const container = document.createElement('div')
|
||||||
|
document.body.appendChild(container)
|
||||||
createApp({
|
createApp({
|
||||||
render() {
|
render() {
|
||||||
return h('div', [
|
return h('div', [
|
||||||
|
|
Loading…
Reference in New Issue