-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
testing-library/testing-library-docs
#1366Description
Hi, I'm trying to create a unit test (which testing-library should be able to help me with, as per its FAQ) for a Component which essentially is just a button. However, I found no way to test that an event is fired when I click the button. I've seen #53 which is probably very similar, so to add to this
- The button doesn't really change on click (I know how to test for that, for example for a "press" animation)
- The event being fired is the primary function of the button - so that's what I'd like to test (to check that clicking an icon triggers it as well and so on)
I've tried passing the function in the second argument of render, however, it doesn't seem to be called.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels