"use strict";

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

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

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

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

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

var Right = function Right(props) {
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
    viewBox: "0 0 32 24",
    fill: "currentColor",
    stroke: "currentColor",
    width: "1em",
    height: "1em"
  }, props), /*#__PURE__*/_react.default.createElement("path", {
    d: "M1 12.376l8.8 9.114L30.431 1.568",
    stroke: "currentColor",
    strokeWidth: 2.6,
    fill: "none"
  }));
};

describe('Icon', function () {
  it('renders Icons using iconfont', function () {
    var MyIcon = _index.default.createFromIconfont('//lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_20337_14.627ee457cf7594fbbce6d5e14b8c29ef.js');

    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(MyIcon, {
      type: "home"
    }), /*#__PURE__*/_react.default.createElement(MyIcon, {
      type: "user"
    })));
    expect(wrapper.asFragment()).toMatchSnapshot();
  });
  it('renders Icons using svg component', function () {
    var wrapper = (0, _react2.render)( /*#__PURE__*/_react.default.createElement(_index.default, {
      size: "lg",
      theme: "primary",
      component: Right
    }));
    expect(wrapper.asFragment()).toMatchSnapshot();
  });
});