Skip to content

Instantly share code, notes, and snippets.

@vdsabev
Last active November 8, 2020 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdsabev/8ba14410866b724d9e6f475e5f2e234a to your computer and use it in GitHub Desktop.
Save vdsabev/8ba14410866b724d9e6f475e5f2e234a to your computer and use it in GitHub Desktop.
describe('Counter', () => {
...
it('should emit value incremented by step', async () => {
await component.setProps({ step: 10 });
component.vm.increment();
expect(component.emitted('input')).toEqual([[10]]);
});
it('should emit value decremented by step', async () => {
await component.setProps({ step: 10 });
component.vm.decrement();
expect(component.emitted('input')).toEqual([[-10]]);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment