Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 379 Bytes

setProps.md

File metadata and controls

20 lines (14 loc) · 379 Bytes

setProps(props)

Sets Wrapper vm props and forces update.

Note the Wrapper must contain a Vue instance.

  • Arguments:

    • {Object} props
  • Example:

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

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