Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 401 Bytes

File metadata and controls

19 lines (13 loc) · 401 Bytes

is(selector)

断言 WrapperArray 的每个 Wrapper 的 DOM 节点或 vm 匹配选择器

  • 参数:

    • {string|Component} selector
  • 返回值:{boolean}

  • 示例:

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

const wrapper = mount(Foo)
const divArray = wrapper.find('div')
expect(divArray.is('div')).toBe(true)