Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 334 Bytes

is.md

File metadata and controls

18 lines (12 loc) · 334 Bytes

is(selector)

断言 Wrapper DOM 节点或 vm 匹配选择器

  • 参数:

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

  • 示例:

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

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