Skip to content

Commit b1b05e5

Browse files
committed
made changes to DiffRoute.test.jsx
1 parent 47d0e75 commit b1b05e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/app/__tests__/DiffRoute.test.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Adapter from 'enzyme-adapter-react-16';
44
import {
55
MemoryRouter as Router, Route, NavLink, Switch,
66
} from 'react-router-dom';
7-
// import { StaticRouter } from 'react-router';
7+
import { createBrowserHistory, createMemoryHistory } from 'history';
88

99
import DiffRoute from '../components/DiffRoute.jsx';
1010

@@ -16,12 +16,12 @@ const props = {
1616
configure({ adapter: new Adapter() });
1717
let wrapper;
1818

19-
xdescribe('DiffRoute props', () => {
19+
describe('DiffRoute props', () => {
2020
it('should have a property called snapshot', () => {
21-
21+
expect(props).toHaveProperty('snapshot');
2222
});
2323
it('props snapshot value should be an array', () => {
24-
24+
expect(Array.isArray(props.snapshot)).toBe(true)
2525
});
2626
});
2727

@@ -30,7 +30,7 @@ describe('DiffRoute component', () => {
3030
wrapper = shallow(<DiffRoute {...props} />);
3131
});
3232
it('should contain a router component', () => {
33-
console.log('wrapper find route --> ', wrapper.find(Router).type());
33+
3434
expect(wrapper.find(Router).type()).toEqual(Router);
3535
});
3636
it('div tag in Router should have a classname "navbar', () => {
@@ -43,5 +43,5 @@ describe('DiffRoute component', () => {
4343

4444

4545
// check if router component has a dive with a navlik component
46-
//check if navlinks go to appropriate routes
46+
// check if navlinks go to appropriate routes
4747
// check if routes in switch have appropriate props

0 commit comments

Comments
 (0)