|
1 | | -// import * as React from 'react'; |
2 | | -// // import renderer from 'react-test-renderer'; |
3 | | -// import Start from './index'; |
| 1 | +/// <reference path="../../typings/globals/jest/index.d.ts" /> |
4 | 2 |
|
5 | | -// import { Provider } from 'react-redux'; |
6 | | -// import mockStore from '../../__tests__/mocks/store'; |
| 3 | +import * as React from 'react'; |
| 4 | +import * as renderer from 'react-test-renderer'; |
| 5 | +import Start from './index'; |
| 6 | +import { Provider } from 'react-redux'; |
7 | 7 |
|
8 | | -// xdescribe('<Start />', () => { |
| 8 | +import '../../__tests__/mocks'; |
| 9 | +import mockStore from '../../__tests__/mocks/store'; |
9 | 10 |
|
10 | | -// xit('renders <Welcome /> if checks pass', () => { |
11 | | -// const store = mockStore({ |
12 | | -// checks: { |
13 | | -// passed: false |
14 | | -// } |
15 | | -// }); |
16 | | -// const tree = renderer.create( |
17 | | -// <Provider store={store}> |
18 | | -// <Start /> |
19 | | -// </Provider> |
20 | | -// ).toJSON(); |
21 | | -// expect(tree).toMatchSnapshot(); |
22 | | -// }); |
| 11 | +describe('<Start />', () => { |
23 | 12 |
|
24 | | -// // xit('renders <Checks /> if check fails', () => { |
25 | | -// // const store = mockStore({ |
26 | | -// // checks: { |
27 | | -// // passed: true |
28 | | -// // } |
29 | | -// // }); |
30 | | -// // const tree = renderer.create( |
31 | | -// // <Provider store={store}> |
32 | | -// // <Start /> |
33 | | -// // </Provider> |
34 | | -// // ).toJSON(); |
35 | | -// // expect(tree).toMatchSnapshot(); |
36 | | -// // }); |
| 13 | + it('renders <Welcome /> if checks pass', () => { |
| 14 | + const store = mockStore({ |
| 15 | + checks: { |
| 16 | + passed: false |
| 17 | + } |
| 18 | + }); |
| 19 | + const tree = renderer.create( |
| 20 | + <Provider store={store}> |
| 21 | + <Start /> |
| 22 | + </Provider> |
| 23 | + ).toJSON(); |
| 24 | + expect(tree).toMatchSnapshot(); |
| 25 | + }); |
37 | 26 |
|
38 | | -// }); |
| 27 | + // xit('renders <Checks /> if check fails', () => { |
| 28 | + // const store = mockStore({ |
| 29 | + // checks: { |
| 30 | + // passed: true |
| 31 | + // } |
| 32 | + // }); |
| 33 | + // const tree = renderer.create( |
| 34 | + // <Provider store={store}> |
| 35 | + // <Start /> |
| 36 | + // </Provider> |
| 37 | + // ).toJSON(); |
| 38 | + // expect(tree).toMatchSnapshot(); |
| 39 | + // }); |
| 40 | + |
| 41 | +}); |
0 commit comments