import React from 'react' ; import { shallow } from 'enzyme' ; import App from '../index' ; import Header from '../Header' ; import { Route } from 'react-router' ; describe ( '<App />' , ( ) => { it ( 'should render the header' , ( ) => { const renderedComponent = shallow ( < App />); expect ( renderedComponent . find ( Header ) . length ) . toBe ( 1 ) ; } ) ; it ( 'should render some routes' , ( ) => { const renderedComponent = shallow ( < App />); expect ( renderedComponent . find ( Route ) . length ) . not . toBe ( 0 ) ; } ) ; } ) ;