11import React from 'react' ;
2- import { configure , shallow } from 'enzyme'
2+ import { configure , shallow } from 'enzyme' ;
33import Adapter from 'enzyme-adapter-react-16' ;
44import {
55 MemoryRouter as Router , Route , NavLink , Switch ,
66} from 'react-router-dom' ;
7- import { createBrowserHistory , createMemoryHistory } from 'history' ;
87
98import 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
2827describe ( '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