import { jsx as ___EmotionJSX } from "@emotion/core";
import React from 'react';
import { shallow } from 'enzyme';
import Modal from './index';

var childComponent = ___EmotionJSX("div", null);

describe('<Modal />', function () {
  describe('modal is closing', function () {
    it('invokes the onClose prop', function () {
      var spy = jest.fn();
      var wrapper = shallow(___EmotionJSX(Modal, {
        isOpen: true,
        onClose: spy
      }, childComponent));
      wrapper.instance().closeModal();
      expect(spy).toHaveBeenCalled();
    });
  });
});