Skip to content

Commit ceb215e

Browse files
committed
test: update vShow tests to workaround jsdom regression
1 parent 96fffe6 commit ceb215e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/runtime-dom/__tests__/directives/vShow.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('runtime-dom: v-show directive', () => {
3030
})
3131
render(h(component), root)
3232

33-
const $div = root.querySelector('div')
33+
const $div = root.children[0]
3434

3535
expect($div.style.display).toEqual('')
3636
})
@@ -46,7 +46,7 @@ describe('runtime-dom: v-show directive', () => {
4646
})
4747
render(h(component), root)
4848

49-
const $div = root.querySelector('div')
49+
const $div = root.children[0]
5050

5151
expect($div.style.display).toEqual('none')
5252
})
@@ -62,7 +62,7 @@ describe('runtime-dom: v-show directive', () => {
6262
})
6363
render(h(component), root)
6464

65-
const $div = root.querySelector('div')
65+
const $div = root.children[0]
6666
const data = root._vnode.component.data
6767

6868
expect($div.style.display).toEqual('')
@@ -113,7 +113,7 @@ describe('runtime-dom: v-show directive', () => {
113113
})
114114
render(h(component), root)
115115

116-
const $div = root.querySelector('div')
116+
const $div = root.children[0]
117117
const data = root._vnode.component.data
118118

119119
expect($div.style.display).toEqual('block')
@@ -138,7 +138,7 @@ describe('runtime-dom: v-show directive', () => {
138138
})
139139
render(h(component), root)
140140

141-
const $div = root.querySelector('div')
141+
const $div = root.children[0]
142142

143143
expect($div.style.display).toEqual('none')
144144

@@ -173,7 +173,7 @@ describe('runtime-dom: v-show directive', () => {
173173
})
174174
render(h(component), root)
175175

176-
const $div = root.querySelector('div')
176+
const $div = root.children[0]
177177

178178
expect($div.style.display).toEqual('none')
179179

0 commit comments

Comments
 (0)