"use strict";

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

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

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

var _index = _interopRequireDefault(require("../index"));

describe('Mask', function () {
  it('renders correctly', function () {
    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
      mountContainer: false,
      visible: true,
      onClick: function onClick() {}
    }));
    expect(wrapper.asFragment()).toMatchSnapshot();
  });
  it('color is transparent', function () {
    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
      mountContainer: false,
      color: "transparent",
      visible: true,
      onClick: function onClick() {}
    }));
    expect(wrapper.asFragment()).toMatchSnapshot();
  });
  it('onClick', function () {
    var onClick = jest.fn();
    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
      mountContainer: false,
      onClick: onClick,
      visible: true
    }, "content"));

    _react2.fireEvent.click(wrapper.getByText('content'));

    expect(onClick).toBeCalled();
  });
});