Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 269 Bytes

destroy.md

File metadata and controls

19 lines (15 loc) · 269 Bytes

destroy()

销毁一个 Vue 组件实例。

  • 示例:
import { mount } from '@vue/test-utils'
import sinon from 'sinon'

const spy = sinon.stub()
mount({
  render: null,
  destroyed () {
    spy()
  }
}).destroy()
expect(spy.calledOnce).toBe(true)