Created
May 24, 2017 18:14
-
-
Save jasongaare/98657788ce80414e7f7ee04777d98684 to your computer and use it in GitHub Desktop.
Our first React Native test using Jest
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
// __tests__/Login-page-test.js | |
import 'react-native'; | |
import React from 'react'; | |
import Login from 'components/sessions/login'; | |
import renderer from 'react-test-renderer'; | |
it('renders correctly', () => { | |
const tree = renderer.create( | |
<Login /> | |
).toJSON(); | |
expect(tree).toMatchSnapshot(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment