@@ -4,7 +4,7 @@ import Adapter from 'enzyme-adapter-react-16';
4
4
import {
5
5
MemoryRouter as Router , Route , NavLink , Switch ,
6
6
} from 'react-router-dom' ;
7
- // import { StaticRouter } from 'react-router ';
7
+ import { createBrowserHistory , createMemoryHistory } from 'history ' ;
8
8
9
9
import DiffRoute from '../components/DiffRoute.jsx' ;
10
10
@@ -16,12 +16,12 @@ const props = {
16
16
configure ( { adapter : new Adapter ( ) } ) ;
17
17
let wrapper ;
18
18
19
- xdescribe ( 'DiffRoute props' , ( ) => {
19
+ describe ( 'DiffRoute props' , ( ) => {
20
20
it ( 'should have a property called snapshot' , ( ) => {
21
-
21
+ expect ( props ) . toHaveProperty ( 'snapshot' ) ;
22
22
} ) ;
23
23
it ( 'props snapshot value should be an array' , ( ) => {
24
-
24
+ expect ( Array . isArray ( props . snapshot ) ) . toBe ( true )
25
25
} ) ;
26
26
} ) ;
27
27
@@ -30,7 +30,7 @@ describe('DiffRoute component', () => {
30
30
wrapper = shallow ( < DiffRoute { ...props } /> ) ;
31
31
} ) ;
32
32
it ( 'should contain a router component' , ( ) => {
33
- console . log ( 'wrapper find route --> ' , wrapper . find ( Router ) . type ( ) ) ;
33
+
34
34
expect ( wrapper . find ( Router ) . type ( ) ) . toEqual ( Router ) ;
35
35
} ) ;
36
36
it ( 'div tag in Router should have a classname "navbar' , ( ) => {
@@ -43,5 +43,5 @@ describe('DiffRoute component', () => {
43
43
44
44
45
45
// 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
47
47
// check if routes in switch have appropriate props
0 commit comments