Last active
October 7, 2017 14:18
-
-
Save bmfteixeira/174d9dd3c50b19a708c93ed109fca87c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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