"use strict";

require("@testing-library/jest-dom");
var _react = require("@testing-library/react");
var _Icon = require("../Icon");
var _jsxRuntime = require("react/jsx-runtime");
describe('Icon Specs', function () {
  test('should return the correct Unicode value for named icon \'wifi\'', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: "wifi"
    }));
    var expected = 983059; // decimal converted charCode of Unicode 'wifi' character
    var actual = _react.screen.getByTestId('icon').textContent.codePointAt();
    expect(actual).toBe(expected);
  });
  test('should return the correct Unicode value when provided \'star\' hex value', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: "0x0F0028"
    }));
    var expected = 983080; // decimal converted charCode of character
    var actual = _react.screen.getByTestId('icon').textContent.codePointAt();
    expect(actual).toBe(expected);
  });
  test('should return the correct Unicode value when provided HTML entity as hex value', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: "\u2605"
    }));
    var expected = 9733; // decimal converted charCode of character
    var actual = _react.screen.getByTestId('icon').textContent.codePointAt();
    expect(actual).toBe(expected);
  });
  test('should return the correct Unicode value when provided Unicode reference', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: "\\u0F0028"
    }));
    var expected = 983080; // decimal converted charCode of Unicode 'star' character
    var actual = _react.screen.getByTestId('icon').textContent.codePointAt();
    expect(actual).toBe(expected);
  });
  test('should support high code point Unicode values', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: String.fromCodePoint(0x0F0028)
    }));
    var expected = 983080; // decimal converted charCode of Unicode 'star' character
    var actual = _react.screen.getByTestId('icon').textContent.codePointAt();
    expect(actual).toBe(expected);
  });
  test('should support preset size "smallest"', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      size: "smallest",
      children: "wifi"
    }));
    var expected = 'smallest';
    var icon = _react.screen.getByTestId('icon');
    expect(icon).toHaveClass(expected);
  });
  test('should support preset size "small"', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      size: "small",
      children: "wifi"
    }));
    var expected = 'small';
    var icon = _react.screen.getByTestId('icon');
    expect(icon).toHaveClass(expected);
  });
  test('should support preset size "large" by default', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      children: "wifi"
    }));
    var expected = 'large';
    var icon = _react.screen.getByTestId('icon');
    expect(icon).toHaveClass(expected);
  });
  test('should support preset size "huge"', function () {
    (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.IconBase, {
      "data-testid": "icon",
      size: "huge",
      children: "wifi"
    }));
    var expected = 'huge';
    var icon = _react.screen.getByTestId('icon');
    expect(icon).toHaveClass(expected);
  });
});