contains(selector)

Assert every wrapper in WrapperArray contains selector.

Use any valid selector.

  • Arguments:

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

  • Example:

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

const wrapper = shallowMount(Foo)
const divArray = wrapper.findAll('div')
expect(divArray.contains('p')).toBe(true)
expect(divArray.contains(Bar)).toBe(true)