Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 348 Bytes

attributes.md

File metadata and controls

16 lines (11 loc) · 348 Bytes

attributes()

Wrapper にラップされている要素の属性をオブジェクトで返します。

  • 戻り値: {[attribute: string]: any}

  • 例:

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

const wrapper = mount(Foo)
expect(wrapper.attributes().id).toBe('foo')