Skip to content

Instantly share code, notes, and snippets.

@bmfteixeira
Created November 6, 2017 11:54
Show Gist options
  • Save bmfteixeira/709b3183cc7f98387710535b5afdfcc6 to your computer and use it in GitHub Desktop.
Save bmfteixeira/709b3183cc7f98387710535b5afdfcc6 to your computer and use it in GitHub Desktop.
import Obj from '../Obj.vue'
describe('Obj', () => {
describe('Lifecycle', () => {
it('created', done => {
const context = {
getInitialConfig: () => {}
}
const getInitialConfigSpy = sinon.spy(context, 'getInitialConfigSpy')
Obj.created.call(context)
expect(getInitialConfigSpy).to.be.calledOnce
getInitialConfigSpy.restore()
done()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment