You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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
I've tried passing the function in the second argument of
render
, however, it doesn't seem to be called.Thanks!
The text was updated successfully, but these errors were encountered: