-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.test.js
More file actions
30 lines (23 loc) · 795 Bytes
/
demo.test.js
File metadata and controls
30 lines (23 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// demo.test.js
import React from 'react';
import renderer from 'react-test-renderer';
import { MultiCityTravelEditContainer } from '../Travel/MultiCityTravelEditContainer';
jest.mock('react-native-datepicker');
describe('My Test Suite', () => {
let travelReducerMock = {
travelReducer: 'test',
};
const inst = renderer
.create(<MultiCityTravelEditContainer travelReducer={travelReducerMock} />)
.getInstance(); let total = 1 + 1
console.log(inst) // shows all
console.log(inst.state) // shows all states
console.log(inst.onChangeValue('params')) // returns what the function should
inst.setState({ data: 'newData' })
it('should run test flawlessly', () => {
expect(total).toBe(2)
})
it('should fail the test', () => {
expect(total).toBe(2)
})
})