import React from 'react'; import { mount, shallow } from 'enzyme'; import Initializer from '../index'; describe('', () => { it('Should not crash', () => { const updatePlugin = jest.fn(); const renderedComponent = shallow(); expect(renderedComponent.children()).toHaveLength(0); }); it('should call the updatePlugin props when mounted', () => { const updatePlugin = jest.fn(); const wrapper = mount(); expect(wrapper.prop('updatePlugin')).toHaveBeenCalledWith('upload', 'isReady', true); }); });