File size: 547 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import React from 'react';
import renderer from 'react-test-renderer';
import { Router, Route } from 'react-router-dom/cjs/react-router-dom.min';
import { createMemoryHistory } from 'history';
import App from './App';
const history = createMemoryHistory('/');
describe('react-router recipe', () => {
it('App renders without crashing', () => {
const component = renderer.create(
<Router history={history}>
<Route path="/" component={App} />
</Router>
);
expect(component.toJSON()).toMatchSnapshot();
});
});
|