Making 100% coverage for App

parent b6739fa4
import React from 'react';
import { shallow, mount } from 'enzyme';
import App from './App';
import LoadingAnimation from 'components/LoadingAnimation';
describe('App Component', () => {
......@@ -14,4 +15,10 @@ describe('App Component', () => {
wrapper.unmount();
});
it('should show LoadingAnimation when loading prop is set to true', () => {
const wrapper = shallow(<App {...defaultProps} loading={true} />);
expect(wrapper.find(LoadingAnimation)).toHaveLength(1);
wrapper.unmount();
});
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment