Skip to content

Commit 65134d1

Browse files
committed
correct Type errors on tests
1 parent 1b3e20d commit 65134d1

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/app/__tests__/ActionContainer.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useStoreContext } from '../store';
88
import { emptySnapshots } from '../actions/actions';
99
import Action from '../components/Action';
1010

11+
1112
configure({ adapter: new Adapter() });
1213

1314
const state = {

src/app/__tests__/Chart.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import React from 'react';
66
import { configure, mount } from 'enzyme';
77
import Adapter from 'enzyme-adapter-react-16';
8-
import Chart from '../components/Chart';
8+
const Chart = require('../components/Chart').default;
9+
910
// Unit test cases for d3 functionality
1011
configure({ adapter: new Adapter() });
1112
// Test the life cycle methods in Chart

src/app/__tests__/Diff.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { configure, shallow } from 'enzyme';
33
import Adapter from 'enzyme-adapter-react-16';
4-
import Diff from '../components/Diff.jsx';
4+
const Diff = require('../components/Diff').default;
55

66
import { useStoreContext } from '../store';
77

src/app/__tests__/DiffRoute.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import Adapter from 'enzyme-adapter-react-16';
44
import {
55
MemoryRouter as Router, Route, NavLink, Switch,
66
} from 'react-router-dom';
7-
8-
import DiffRoute from '../components/DiffRoute.jsx';
7+
const DiffRoute = require('../components/DiffRoute').default;
98

109
const props = {
1110
snapshot: [{}],

src/app/__tests__/SwitchApp.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import Select from 'react-select';
33
import { configure, shallow } from 'enzyme';
44
import Adapter from 'enzyme-adapter-react-16';
5-
import SwitchApp from '../components/SwitchApp.jsx';
5+
import SwitchApp from '../components/SwitchApp';
66

77
import { useStoreContext } from '../store';
88

0 commit comments

Comments
 (0)