diff --git a/packages/react-bootstrap-table2-overlay/test/index.test.js b/packages/react-bootstrap-table2-overlay/test/index.test.js index 1292475..1437b33 100644 --- a/packages/react-bootstrap-table2-overlay/test/index.test.js +++ b/packages/react-bootstrap-table2-overlay/test/index.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { shallow, render } from 'enzyme'; +import { shallow } from 'enzyme'; import LoadingOverlay from 'react-loading-overlay'; import overlayFactory from '..'; @@ -27,8 +27,8 @@ describe('overlayFactory', () => { describe('when loading is false', () => { beforeEach(() => { const tableElm = createTable(); - const Overlay = overlayFactory()(tableElm, false); - wrapper = shallow(); + const Overlay = overlayFactory()(false); + wrapper = shallow({ tableElm }); }); it('should rendering Overlay component correctly', () => { @@ -42,14 +42,14 @@ describe('overlayFactory', () => { describe('when loading is true', () => { beforeEach(() => { const tableElm = createTable(); - const Overlay = overlayFactory()(tableElm, true); - wrapper = render(); + const Overlay = overlayFactory()(true); + wrapper = shallow({ tableElm }); }); it('should rendering Overlay component correctly', () => { const overlay = wrapper.find(LoadingOverlay); expect(wrapper.length).toBe(1); - expect(overlay.length).toBe(0); + expect(overlay.length).toBe(1); }); }); @@ -60,8 +60,8 @@ describe('overlayFactory', () => { }; beforeEach(() => { const tableElm = createTable(); - const Overlay = overlayFactory(options)(tableElm, false); - wrapper = shallow(); + const Overlay = overlayFactory(options)(false); + wrapper = shallow({ tableElm }); }); it('should rendering Overlay component with options correctly', () => {