How to test events? #614

Closed
AnnieCyl opened this Issue Jun 19, 2014 · 2 comments

Comments

Projects
None yet
3 participants

I know that jasmine-jquery offers spyOnEvent to spy on jQuery events.
But I don't use jQuery, how can I test my events via jasmine?

Contributor

infews commented Jun 23, 2014

Since this is a "how to test" type of question, have you tried the Jasmine Google Group - jasmine-js@googlegroups.com. More of the community gathers there to help people with testing patterns..

That said, I'm a fan of unit-testing my event handlers without them being called via event firing. Then I use integration tests - usually not in Jasmine - to validate that registration happens and all of the glue code is working.

Owner

slackersoft commented Aug 14, 2014

Closing, as this is a "how to test" and not an issue with jasmine itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment