Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 348 Bytes

isVueInstance.md

File metadata and controls

17 lines (12 loc) · 348 Bytes

isVueInstance()

断言 WrapperArray 的每个 Wrapper 都是 Vue 实例。

  • 返回值:{boolean}

  • 示例:

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

const wrapper = mount(Foo)
const barArray = wrapper.findAll(Bar)
expect(barArray.isVueInstance()).toBe(true)