Skip to content

Files

Latest commit

a956468 · Feb 22, 2021

History

History
18 lines (12 loc) · 345 Bytes

exists.md

File metadata and controls

18 lines (12 loc) · 345 Bytes

exists

Assert Wrapper exists.

Returns false if called on a Wrapper which does not exist.

  • Returns: {boolean}

  • Example:

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

const wrapper = mount(Foo)
expect(wrapper.exists()).toBe(true)
expect(wrapper.find('does-not-exist').exists()).toBe(false)