You’re browsing the documentation for Vue Test Utils for Vue v2.x and earlier.

To read docs for Vue Test Utils for Vue 3, click here.


Return Wrapper DOM node classes.

Returns an Array of class names or a boolean if a class name is provided.

  • Arguments:

    • {string} className optional
  • Returns: Array<{string}> | boolean

  • Example:

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

const wrapper = mount(Foo)