Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 379 Bytes

isVueInstance.md

File metadata and controls

18 lines (13 loc) · 379 Bytes

isVueInstance()

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

  • 返回值:{boolean}

  • 示例:

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 barArray = wrapper.findAll(Bar)
expect(barArray.isVueInstance()).toBe(true)