Last active
July 22, 2019 22:14
-
-
Save achhunna/8be3549143f05232e766c8daf0b3aa0a to your computer and use it in GitHub Desktop.
DOM action events (keydown)
This file contains hidden or 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
test('emit events when keydown.a pressed', () => { | |
wrapper.trigger('keydown', { | |
key: 'a' | |
}); | |
expect(wrapper.emitted().aPressed.length).toBe(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment