2019-04-05 02:23:40 +07:00
|
|
|
/**
|
|
|
|
* NotFound component
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
|
|
import { shallow } from 'enzyme';
|
2019-05-02 02:02:46 +07:00
|
|
|
import NotFound from '../../../src/webui/components/NotFound/index';
|
2019-04-05 02:23:40 +07:00
|
|
|
|
|
|
|
console.error = jest.fn();
|
|
|
|
|
|
|
|
describe('<NotFound /> component', () => {
|
|
|
|
let routerWrapper;
|
|
|
|
beforeEach(() => {
|
|
|
|
routerWrapper = shallow(
|
|
|
|
<Router>
|
|
|
|
<NotFound />
|
|
|
|
</Router>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
test('should load the component in default state', () => {
|
|
|
|
expect(routerWrapper.find(NotFound)).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|