"use strict";

var _jsxRuntime = require("react/jsx-runtime");

var _enzyme = require("enzyme");

var _SwitchItem = require("../SwitchItem");

describe('SwitchItem specs', function () {
  test('should contain a Switch', function () {
    var subject = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_SwitchItem.SwitchItemBase, {
      children: "SwitchItem"
    }));
    var expected = 1;
    var actual = subject.find('Switch').length;
    expect(actual).toBe(expected);
  });
  test('should pass selected to Switch element', function () {
    var subject = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_SwitchItem.SwitchItemBase, {
      selected: true,
      children: "SwitchItem"
    }));
    var expected = true;
    var actual = subject.find('Switch').prop('selected');
    expect(actual).toBe(expected);
  });
  test('should apply disabled when `disabled` prop is true', function () {
    var subject = (0, _enzyme.mount)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_SwitchItem.SwitchItemBase, {
      disabled: true,
      children: "SwitchItem"
    }));
    var expected = true;
    var actual = subject.prop('disabled');
    expect(actual).toBe(expected);
  });
});