Last active
December 7, 2017 14:03
-
-
Save ovidiuch/12de18e8c0c351b5fb54fea872bbadc4 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
const onReply = jest.fn(); | |
const wrapper = shallow(<UnrealisticComponent onReply={onReply} />) | |
test('kindly asks if everything is alright', () => { | |
expect(wrapper.text()).toBe('Alles gut?') | |
}) | |
test('receives positive response upon click', () => { | |
wrapper.find('button').simulate('click') | |
expect(onReply).toHaveBeenCalledWith('Ja') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment