"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _react = require("@testing-library/react");

var _react2 = _interopRequireDefault(require("react"));

var _Popup = _interopRequireDefault(require("../Popup"));

/* eslint-disable @typescript-eslint/no-var-requires */

/* eslint-disable dot-notation */

/* eslint-disable no-unused-expressions */
describe('Popup', function () {
  describe('snapshot', function () {
    it('renders correctly', function () {
      var onMaskClick = jest.fn();
      var afterClose = jest.fn();
      var wrapper = (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_Popup.default, {
        direction: "bottom",
        onMaskClick: onMaskClick,
        afterClose: afterClose,
        mountContainer: false
      }, "foo"));
      expect(wrapper.asFragment()).toMatchSnapshot();
    });
    it('renders mount node correctly', function () {
      var onMaskClick = jest.fn();
      var afterClose = jest.fn();
      var wrapper = (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_Popup.default, {
        visible: true,
        direction: "bottom",
        onMaskClick: onMaskClick,
        afterClose: afterClose,
        mountContainer: function mountContainer() {
          return document.body;
        }
      }, "foo"));
      expect(wrapper.asFragment()).toMatchSnapshot();
    });
  });
});