Skip to content

Commit 51f91df

Browse files
committed
Add Tests to Check for Crashing
1 parent 032b91b commit 51f91df

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

__tests__/app/App.test.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
21
import React from 'react';
2+
import ReactDOM from 'react-dom';
33
import { shallow } from 'enzyme';
44
import App from '../../app/App';
5+
56
describe('<App />', () => {
67
let wrapper: any;
78
beforeAll(() => {
89
wrapper = shallow(<App />);
910
});
1011

12+
it('renders without crashing', () => {
13+
const div = document.createElement('div');
14+
ReactDOM.render(<App />, div);
15+
ReactDOM.unmountComponentAtNode(div);
16+
});
17+
1118
it('should render <Splash /> on the first visit', () => {
12-
expect(wrapper).toMatchSnapshot()
19+
expect(wrapper).toMatchSnapshot();
1320
});
14-
// xit('should render <DashboardContainer /> if not on the first visit');
15-
});
21+
});

0 commit comments

Comments
 (0)