Skip to content

Instantly share code, notes, and snippets.

@tanner-west
Created April 13, 2022 18:14
Show Gist options
  • Save tanner-west/8e7790099a2803a1c7e7796d2ed06318 to your computer and use it in GitHub Desktop.
Save tanner-west/8e7790099a2803a1c7e7796d2ed06318 to your computer and use it in GitHub Desktop.
it('Should increment counter when button is pressed', () => {
const button = getByTestId(wrapper, 'increment-counter');
expect(wrapper.state('counter')).toEqual(0);
button.props().onPress();
expect(wrapper.state('counter')).toEqual(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment