Skip to content

Files

Latest commit

4086c53 · Feb 22, 2018

History

History
18 lines (13 loc) · 390 Bytes

update.md

File metadata and controls

18 lines (13 loc) · 390 Bytes

update()

Force root Vue component to re-render.

If called on a Wrapper containing a vm, it will force the Wrapper vm to re-render.

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

const wrapper = mount(Foo)
expect(wrapper.vm.bar).toBe('bar')
wrapper.vm.bar = 'new value'
wrapper.update()
expect(wrapper.vm.bar).toBe('new value')