/*
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 * as React from 'react';
import { shallow } from 'enzyme';
import * as StyledComponents from '../styled-components.js';

function makeTest(_ref) {
  var title = _ref.title,
      Component = _ref.component,
      _ref$props = _ref.props,
      props = _ref$props === void 0 ? {} : _ref$props,
      _ref$children = _ref.children,
      children = _ref$children === void 0 ? null : _ref$children,
      _ref$snapshotName = _ref.snapshotName,
      snapshotName = _ref$snapshotName === void 0 ? 'correct styles' : _ref$snapshotName;
  test(title, function () {
    var shallowed = shallow(React.createElement(Component, props, children));
    expect(shallowed.instance().getStyles()).toMatchSnapshot(snapshotName);
  });
}

describe('Pagination Styled Components', function () {
  Object.keys(StyledComponents).forEach(function (componentName) {
    makeTest({
      title: "".concat(componentName, " - basic renders"),
      component: StyledComponents[componentName]
    });
  });
});