2017-11-29 18:46:38 +05:30
|
|
|
/**
|
|
|
|
* NotFound component
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
2019-01-31 21:58:59 +01:00
|
|
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
|
|
import { shallow } from 'enzyme';
|
2018-07-17 21:22:44 +02:00
|
|
|
import NotFound from '../../../../src/webui/components/NotFound/index';
|
2017-11-29 18:46:38 +05:30
|
|
|
|
|
|
|
console.error = jest.fn();
|
|
|
|
|
2017-12-02 18:04:42 +05:30
|
|
|
describe('<NotFound /> component', () => {
|
2019-01-31 21:58:59 +01:00
|
|
|
let routerWrapper;
|
|
|
|
beforeEach(() => {
|
|
|
|
routerWrapper = shallow(
|
|
|
|
<Router>
|
|
|
|
<NotFound />
|
|
|
|
</Router>
|
|
|
|
);
|
2017-11-29 18:46:38 +05:30
|
|
|
});
|
|
|
|
|
2019-01-31 21:58:59 +01:00
|
|
|
|
|
|
|
test('should load the component in default state', () => {
|
|
|
|
expect(routerWrapper.find(NotFound)).toMatchSnapshot();
|
2017-11-29 18:46:38 +05:30
|
|
|
});
|
2019-01-31 21:58:59 +01:00
|
|
|
|
2017-11-29 18:46:38 +05:30
|
|
|
});
|