function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { shallow } from 'enzyme';
import { StyledRoot, StyledStar, StyledEmoticon } from '../styled-components.js';
describe('StyledComponents', function () {
  describe('StyledRoot', function () {
    it('displays correct styles by default', function () {
      var component = shallow(React.createElement(StyledRoot, null));
      expect(component.instance().getStyles()).toMatchSnapshot();
    });
  });
  describe('StyledStar', function () {
    it('displays correct styles by default', function () {
      var component = shallow(React.createElement(StyledStar, null));
      expect(component.instance().getStyles()).toMatchSnapshot();
    });
    it.each([['$isActive'], ['$isSelected']])('displays correct styling with state %s', function (stateProp) {
      var props = _defineProperty({}, "".concat(stateProp), true);

      var component = shallow(React.createElement(StyledStar, props));
      expect(component.instance().getStyles()).toMatchSnapshot();
    });
  });
  describe('StyledEmoticon', function () {
    it('displays correct styles by default', function () {
      var component = shallow(React.createElement(StyledEmoticon, {
        $index: 1
      }));
      expect(component.instance().getStyles()).toMatchSnapshot();
    });
    it.each([['$isActive'], ['$isSelected']])('displays correct styling with state %s', function (stateProp) {
      var _props2;

      var props = (_props2 = {}, _defineProperty(_props2, "".concat(stateProp), true), _defineProperty(_props2, "$index", 1), _props2);
      var component = shallow(React.createElement(StyledEmoticon, props));
      expect(component.instance().getStyles()).toMatchSnapshot();
    });
    describe('EmoticonStates', function () {
      it.each([[1], [2], [3], [4], [5]])('displays correct SVG icon with $index=%d', function ($index) {
        var component = shallow(React.createElement(StyledEmoticon, {
          $index: $index
        }));
        expect(component.instance().getStyles()).toMatchSnapshot();
      });
    });
  });
});