Returns Wrapper
of first DOM node or Vue component matching selector.
Use any valid selector.
-
Arguments:
{string|Component} selector
-
Returns:
{Wrapper}
-
Example:
import { mount } from 'vue-test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
import Bar from './Bar.vue'
const wrapper = mount(Foo)
const div = wrapper.find('div')
expect(div.is('div')).toBe(true)
const bar = wrapper.find(Bar)
expect(bar.is(Bar)).toBe(true)
- See also: Wrapper