-
-
Save reime005/3b31dd343fc2d267886a04df351dbd21 to your computer and use it in GitHub Desktop.
This file contains 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
/* src/store/__tests__/ui.test.js */ | |
//... | |
it('should handle button click event', () => { | |
const onButtonClick = sinon.spy(); | |
const app = shallow(<Home makeCall={onButtonClick} />); | |
const button = app.find({ id: 'testButton' }); | |
button.simulate('click'); | |
expect(onButtonClick.calledOnce).toBe(true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment