Skip to content

Instantly share code, notes, and snippets.

@bmfteixeira
Last active October 7, 2017 14:18
Show Gist options
  • Save bmfteixeira/174d9dd3c50b19a708c93ed109fca87c to your computer and use it in GitHub Desktop.
Save bmfteixeira/174d9dd3c50b19a708c93ed109fca87c to your computer and use it in GitHub Desktop.
describe('Watcher component', () => {
let props
beforeEach(() => {
props = {
propId: 1
}
})
describe('Watcher', () => {
it('propId', done => {
const wrapper = shallow(WatcherComponent, {
propsData: props
})
const consoleLogValueStub = sinon.stub(wrapper.vm, 'consoleLogValue')
wrapper.setProps({
propId: 2
})
expect(consoleLogValueStub).to.be.calledWith(2)
consoleLogValueStub.restore()
done()
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment