"use strict";

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

var _enzyme = _interopRequireWildcard(require("enzyme"));

var _Spinner = _interopRequireDefault(require("../Spinner"));

var _enzymeAdapterReact = _interopRequireDefault(require("enzyme-adapter-react-16"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

_enzyme.default.configure({
  adapter: new _enzymeAdapterReact.default()
});

describe('Spinner', function () {
  test('should render with default small size', function () {
    var shallowWrapper = (0, _enzyme.shallow)(_react.default.createElement(_Spinner.default, null));
    expect(shallowWrapper.hasClass('vs-spinner')).toEqual(true);
    expect(shallowWrapper.hasClass('vs-spinner-small')).toEqual(true);
  });
  test('should render with large size', function () {
    var shallowWrapper = (0, _enzyme.shallow)(_react.default.createElement(_Spinner.default, {
      size: "large"
    }));
    expect(shallowWrapper.hasClass('vs-spinner')).toEqual(true);
    expect(shallowWrapper.hasClass('vs-spinner-large')).toEqual(true);
  });
  test('should render with extra-large size', function () {
    var shallowWrapper = (0, _enzyme.shallow)(_react.default.createElement(_Spinner.default, {
      size: "extra-large"
    }));
    expect(shallowWrapper.hasClass('vs-spinner')).toEqual(true);
    expect(shallowWrapper.hasClass('vs-spinner-extra-large')).toEqual(true);
  });
});