Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 492 Bytes

name.md

File metadata and controls

21 lines (15 loc) · 492 Bytes

name

::: warning Deprecation warning name is deprecated and will be removed in future releases. :::

Returns component name if Wrapper contains a Vue instance, or the tag name of Wrapper DOM node if Wrapper does not contain a Vue instance.

  • Returns: {string}

  • Example:

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

const wrapper = mount(Foo)
expect(wrapper.name()).toBe('Foo')
const p = wrapper.find('p')
expect(p.name()).toBe('p')