Created
November 4, 2019 18:43
-
-
Save andyrichardson/47c7b8151732918e1569e91905f84fa7 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
describe('on user click', () => { | |
const props = { | |
friends, | |
onUserChange: jest.fn(), | |
}; | |
it('calls on user change', () => { | |
const wrapper = shallow(<FriendsList {…props} />); | |
wrapper.find('FriendItem[value="Paul"]').simulate('click'); | |
expect(onUserChange).toBeCalledWith('Paul'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment