Skip to content

Commit 40fd8fa

Browse files
committed
modified DiffRoute test jsx
1 parent b1b05e5 commit 40fd8fa

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/app/__tests__/DiffRoute.test.jsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import React from 'react';
2-
import { configure, shallow } from 'enzyme'
2+
import { configure, shallow } from 'enzyme';
33
import Adapter from 'enzyme-adapter-react-16';
44
import {
55
MemoryRouter as Router, Route, NavLink, Switch,
66
} from 'react-router-dom';
7-
import { createBrowserHistory, createMemoryHistory } from 'history';
87

98
import DiffRoute from '../components/DiffRoute.jsx';
109

@@ -21,16 +20,15 @@ describe('DiffRoute props', () => {
2120
expect(props).toHaveProperty('snapshot');
2221
});
2322
it('props snapshot value should be an array', () => {
24-
expect(Array.isArray(props.snapshot)).toBe(true)
23+
expect(Array.isArray(props.snapshot)).toBe(true);
2524
});
2625
});
2726

2827
describe('DiffRoute component', () => {
2928
beforeEach(() => {
30-
wrapper = shallow(<DiffRoute {...props} />);
29+
wrapper = shallow(<DiffRoute />);
3130
});
3231
it('should contain a router component', () => {
33-
3432
expect(wrapper.find(Router).type()).toEqual(Router);
3533
});
3634
it('div tag in Router should have a classname "navbar', () => {
@@ -41,7 +39,7 @@ describe('DiffRoute component', () => {
4139
});
4240
});
4341

44-
45-
// check if router component has a dive with a navlik component
46-
// check if navlinks go to appropriate routes
42+
// remaining tests:
43+
// check if router component has a div with a navlik component
44+
// check if navlinks go to appropriate routes, and text shows Tree and Raw
4745
// check if routes in switch have appropriate props

0 commit comments

Comments
 (0)