From ceb215e45def3d9ed7df67af8606fe4566f7457d Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 8 Jan 2024 15:03:10 +0800 Subject: [PATCH] test: update vShow tests to workaround jsdom regression --- .../runtime-dom/__tests__/directives/vShow.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/runtime-dom/__tests__/directives/vShow.spec.ts b/packages/runtime-dom/__tests__/directives/vShow.spec.ts index e2e5baac45..5e83765085 100644 --- a/packages/runtime-dom/__tests__/directives/vShow.spec.ts +++ b/packages/runtime-dom/__tests__/directives/vShow.spec.ts @@ -30,7 +30,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] expect($div.style.display).toEqual('') }) @@ -46,7 +46,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] expect($div.style.display).toEqual('none') }) @@ -62,7 +62,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] const data = root._vnode.component.data expect($div.style.display).toEqual('') @@ -113,7 +113,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] const data = root._vnode.component.data expect($div.style.display).toEqual('block') @@ -138,7 +138,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] expect($div.style.display).toEqual('none') @@ -173,7 +173,7 @@ describe('runtime-dom: v-show directive', () => { }) render(h(component), root) - const $div = root.querySelector('div') + const $div = root.children[0] expect($div.style.display).toEqual('none') -- 2.47.2