Last active
April 13, 2022 18:28
-
-
Save tanner-west/a747830c77f6dd8fea5397d7b496d2a8 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('Should increment counter when button is pressed', () => { | |
const button = getByTestId(wrapper, 'increment-counter'); | |
const counterTextBefore = getByTestId(wrapper, 'counter-text'); | |
expect(counterTextBefore.props().children).toEqual(0); | |
button.props().onPress(); | |
const counterTextAfter = getByTestId(wrapper, 'counter-text'); | |
expect(counterTextAfter.props().children).toEqual(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment