import React from 'react'; import { shallow } from 'enzyme'; import configStore from '../src/common/configStore'; import Root from '../src/Root'; describe('Root', () => { it('Root has no error', () => { const DumpContainer = () =>
{this.props.children}
; const NotFoundComp = () =>
Not found
; const routes = [{ childRoutes: [ { path: '/', component: DumpContainer, childRoutes: [{ path: 'abc' }] }, { path: '/root', autoIndexRoute: true }, { path: 'relative-path', name: 'Link Name' }, { path: 'sub-links', childRoutes: [ { path: 'sub-link' }, ], }, { path: '*', component: NotFoundComp }, ], }]; const store = configStore(); shallow( ); }); });