Skip to content

Instantly share code, notes, and snippets.

@thomashagstrom
Last active January 13, 2019 12:22
Show Gist options
  • Save thomashagstrom/ad8b1e5995037b3fd7ab5d2033b8d46a to your computer and use it in GitHub Desktop.
Save thomashagstrom/ad8b1e5995037b3fd7ab5d2033b8d46a to your computer and use it in GitHub Desktop.
Jest find React child by testID
it('On forgot password should not throw', () => {
const wrapper = TestRenderer.create(<CognitoLogin />);
const child = wrapper.root.findByProps({
testID: 'ForgotForm',
});
expect(child).toBeDefined();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment