Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 600 Bytes

isEmpty.md

File metadata and controls

24 lines (16 loc) · 600 Bytes

isEmpty

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

Consider a custom matcher such as those provided in jest-dom.

When using with findComponent, access the DOM element with findComponent(Comp).element :::

Assert every Wrapper in WrapperArray does not contain child node.

  • Returns: {boolean}

  • Example:

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

const wrapper = mount(Foo)
const divArray = wrapper.findAll('div')
expect(divArray.isEmpty()).toBe(true)