-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexTest.js
More file actions
20 lines (17 loc) · 733 Bytes
/
Copy pathindexTest.js
File metadata and controls
20 lines (17 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import 'react-native'
import React from 'react';
import App from '../App/Containers/LoginScreen/index.js';
import {shallow} from 'enzyme';
import renderer from 'react-test-renderer'
test('App component renders correctly if show is true', () => {
const tree = renderer.create(<App title='howdy' />).toJSON()
expect(tree).toMatchSnapshot()
})
test('App component does not render if show is false', () => {
const tree = renderer.create(<App title='howdy' show={false} />).toJSON()
expect(tree).toMatchSnapshot()
})
test('App component renders correctly if backgroundColor prop is set', () => {
const tree = renderer.create(<App title='howdy' style={{backgroundColor: 'red'}} />).toJSON()
expect(tree).toMatchSnapshot()
})