From: Evan You Date: Thu, 8 Aug 2024 06:42:07 +0000 (+0800) Subject: chore: use fresh containers for app mount tests X-Git-Tag: v3.5.0-beta.1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d5743223f3d7189e70e64e2c0bf528ee4ed927f;p=thirdparty%2Fvuejs%2Fcore.git chore: use fresh containers for app mount tests --- diff --git a/packages/runtime-dom/__tests__/customElement.spec.ts b/packages/runtime-dom/__tests__/customElement.spec.ts index eb7a4b368d..38af0e2a63 100644 --- a/packages/runtime-dom/__tests__/customElement.spec.ts +++ b/packages/runtime-dom/__tests__/customElement.spec.ts @@ -104,6 +104,8 @@ describe('defineCustomElement', () => { }, }) const app = createApp(containerComp) + const container = document.createElement('div') + document.body.appendChild(container) app.mount(container) const myInputEl = container.querySelector('my-el-input')! const inputEl = myInputEl.shadowRoot!.querySelector('input')! @@ -115,7 +117,6 @@ describe('defineCustomElement', () => { myInputEl.removeAttribute('value') await nextTick() expect(inputEl.value).toBe('') - app.unmount() }) test('should not unmount on move', async () => { @@ -1188,6 +1189,8 @@ describe('defineCustomElement', () => { }, }), ) + const container = document.createElement('div') + document.body.appendChild(container) createApp({ render() { return h('div', [