forked from jaedb/Iris
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.test.js
More file actions
executable file
·40 lines (38 loc) · 1.14 KB
/
App.test.js
File metadata and controls
executable file
·40 lines (38 loc) · 1.14 KB
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
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import { render } from './test-wrapper';
import App from '../src/js/App';
import { state as mockState } from './state';
// jest.mock('react-router-dom', () => ({
// ...jest.requireActual('react-router-dom'),
// useNavigate: () => jest.fn(),
// useHistory: () => ({
// location: {
// pathname: 'iris.local:6680/iris',
// },
// }),
// useLocation: () => ({
// pathname: 'iris.local:6680/iris',
// }),
// }));
// jest.mock('react-dnd', () => ({
// ...jest.requireActual('react-dnd'),
// useDrag: jest.fn(),
// useDrop: jest.fn(),
// }));
// jest.mock('react-redux', () => ({
// persistReducer: jest.fn().mockImplementation((config, reducers) => reducers),
// useSelector: () => jest.fn(fn => fn(mockState)),
// useDispatch: () => jest.fn(),
// connect: jest.fn(fn => fn()),
// }));
// TODO
// It seems uncommenting the mocks above causes null state issues
xdescribe('<App />', () => {
it('should render', () => {
const result = render(
<App />,
{ initialState: mockState },
).toJSON();
expect(result).toMatchSnapshot();
});
});