Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 304 Bytes

destroy.md

File metadata and controls

20 lines (16 loc) · 304 Bytes

destroy()

销毁一个 Vue 组件实例。

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

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