Created
April 14, 2017 02:54
-
-
Save Tin-Nguyen/743b228c07a4ee58c19e16b4625e9d1f to your computer and use it in GitHub Desktop.
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
it('simulates click events', () => { | |
const onButtonClick = sinon.spy() | |
const wrapper = shallow( | |
<Foo onButtonClick={onButtonClick} /> | |
) | |
wrapper.find('button').simulate('click') | |
expect(onButtonClick.calledOnce).to.be.true | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment