Skip to content

Commit

Permalink
test: add tests for parent
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Sep 26, 2020
1 parent f1144a8 commit eeb74c3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/isVisible.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ describe('isVisible', () => {
expect(wrapper.find('span').isVisible()).toBe(true)
})

it('returns false when element parent is invisible via v-show', () => {
const Comp = {
template: `<div v-show="false"><span /></div>`
}
const wrapper = mount(Comp)

expect(wrapper.find('span').isVisible()).toBe(false)
})

it('element becomes hidden reactively', async () => {
const Comp = {
template: `<button @click="show = false" /><span v-show="show" />`,
Expand Down

0 comments on commit eeb74c3

Please sign in to comment.