Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 652 Bytes

findAll.md

File metadata and controls

31 lines (20 loc) · 652 Bytes

findAll

::: warning Deprecation warning Using findAll to search for Components is deprecated and will be removed. Use findAllComponents instead. :::

Returns a WrapperArray.

Use any valid selector.

  • Arguments:

    • {string|Component} selector
  • Returns: {WrapperArray}

  • Example:

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

const wrapper = mount(Foo)

const div = wrapper.findAll('div').at(0)
expect(div.is('div')).toBe(true)

const bar = wrapper.findAll(Bar).at(0) // Deprecated usage
expect(bar.is(Bar)).toBe(true)