Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 458 Bytes

isVisible.md

File metadata and controls

20 lines (13 loc) · 458 Bytes

isVisible()

Assert Wrapper is visible.

Returns false if an ancestor element has display: none or visibility: hidden style.

This can be used to assert that a component is hidden by v-show.

  • Returns: {boolean}

  • Example:

import { mount } from '@vue/test-utils'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
expect(wrapper.isVisible()).toBe(true)
expect(wrapper.find('.is-not-visible').isVisible()).toBe(false)