diff --git a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx
index 1c275378eb..313092b1b6 100644
--- a/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx
+++ b/tests/components/ct-vue-cli/src/notation-jsx.spec.tsx
@@ -86,6 +86,13 @@ test('run hooks', async ({ page, mount }) => {
expect(messages).toEqual(['Before mount: {\"route\":\"A\"}, app: true', 'After mount el: HTMLButtonElement'])
})
+test('unmount', async ({ page, mount }) => {
+ const component = await mount()
+ await expect(page.locator('#root')).toContainText('Submit')
+ await component.unmount();
+ await expect(page.locator('#root')).not.toContainText('Submit');
+})
+
test('unmount a multi root component', async ({ mount, page }) => {
const component = await mount()
await expect(page.locator('#root')).toContainText('root 1')
diff --git a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx
index ba3be167cf..a5fe871669 100644
--- a/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx
+++ b/tests/components/ct-vue2-cli/src/notation-jsx.spec.tsx
@@ -85,6 +85,13 @@ test('run hooks', async ({ page, mount }) => {
expect(messages).toEqual(['Before mount: {\"route\":\"A\"}', 'After mount el: HTMLButtonElement'])
})
+test('unmount', async ({ page, mount }) => {
+ const component = await mount()
+ await expect(page.locator('#root')).toContainText('Submit')
+ await component.unmount();
+ await expect(page.locator('#root')).not.toContainText('Submit');
+})
+
test('get textContent of the empty template', async ({ mount }) => {
const component = await mount();
expect(await component.allTextContents()).toEqual(['']);