-
-
Save dvallin/1c735e3091cf01c298ba4d4cd658442a 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('add task', () => { | |
it('calls add task on key enter', () => { | |
const wrapper = mount(NewTaskInput); | |
const addTask = jest.fn(); | |
wrapper.setMethods({addTask}); | |
wrapper.find('input').trigger('keyup.enter'); | |
expect(addTask).toHaveBeenCalled(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment