let wrapper = mount(Component, options)
await nextTick()
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
expect(inComponentWatch).toHaveBeenCalledTimes(1)
wrapper = mount(Component, options)
await nextTick()
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
expect(inComponentWatch).toHaveBeenCalledTimes(2)
}
let wrapper = mount(Component, options)
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
expect(globalWatch).toHaveBeenCalledTimes(1)
expect(globalWatch).toHaveBeenCalledTimes(2)
wrapper = mount(Component, options)
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
expect(globalWatch).toHaveBeenCalledTimes(3)
expect(spy1).toHaveBeenCalledTimes(2)
expect(spy2).toHaveBeenCalledTimes(2)
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
s1.changeName('again')
expect(spy1).toHaveBeenCalledTimes(2)
expect(spy).toHaveBeenCalledTimes(1)
expect(wrapper.html()).toBe('n: 1')
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
store.n++
await nextTick()
expect(spy).toHaveBeenCalledTimes(2)
expect(spy1).toHaveBeenCalledTimes(2)
expect(spy2).toHaveBeenCalledTimes(2)
- await wrapper.unmount()
+ wrapper.unmount()
+ await nextTick()
s1.$patch({ name: 'b' })
expect(spy1).toHaveBeenCalledTimes(2)