Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 342 Bytes

setData.md

File metadata and controls

19 lines (13 loc) · 342 Bytes

setData(data)

Sets Wrapper vm data and forces update.

Note the Wrapper must contain a Vue instance.

  • Arguments:

    • {Object} data
  • Example:

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

const wrapper = mount(Foo)
wrapper.setData({ foo: 'bar' })
expect(wrapper.vm.foo).toBe('bar')