Assert every Wrapper
in WrapperArray
DOM node has attribute
matching value
.
-
Arguments:
{string} attribute
{string} value
-
Returns:
{boolean}
-
Example:
import { mount } from 'vue-test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'
const wrapper = mount(Foo)
const divArray = wrapper.findAll('div')
expect(divArray.hasAttribute('id', 'foo')).toBe(true)