"use strict";

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

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

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

var _utils = require("ts-jest/utils");

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

var _date = require("../../../tests/testData/date");

var _parseState = _interopRequireDefault(require("../utils/parseState"));

var _Month = _interopRequireDefault(require("../Month"));

jest.mock('../utils/parseState');
var mockedParseState = (0, _utils.mocked)(_parseState.default);
describe('Calendar snapshot', function () {
  afterAll(function () {
    jest.resetAllMocks();
    jest.restoreAllMocks();
  });
  it('calendar render', function () {
    jest.spyOn(_Month.default.prototype, 'checkStatus').mockReturnValue({
      disabled: false,
      isSelected: true,
      isRange: true,
      rangeStart: true,
      rangeEnd: true
    });
    mockedParseState.mockReturnValue({
      value: [_date.date2, _date.date6],
      min: _date.date2,
      max: _date.date6,
      refresh: false,
      steps: 1,
      mode: 'multiple',
      direction: 'vertical'
    });
    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
      defaultValue: _date.date2,
      min: _date.date2,
      max: _date.date6,
      mode: "multiple"
    }));
    expect(wrapper.asFragment()).toMatchSnapshot();
  });
});