Vue γ³γ³γγΌγγ³γγεΌ·εΆηγ«εζη»γγΎγγ
vm
γε«γ Wrapper
γ§εΌγ³εΊγγγε ΄εγWrapper
vm
γεΌ·εΆηγ«εζη»γγΎγγ
- δΎ:
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
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')