"use strict";

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

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

var _enzyme = require("enzyme");

var _ = _interopRequireDefault(require("."));

describe('Metric', function () {
  it('displays a metric', function () {
    var node = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_["default"], {
      data: 0.98
    }));
    expect(node.hasClass('Metric')).toBe(true);
  });
  it('should render a chart', function () {
    var node = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_["default"], {
      chart: "doughnut",
      className: "AdditionalTestingClass",
      data: {
        labels: ['200', '400', '404'],
        datasets: [{
          data: [300, 100, 50],
          backgroundColor: ['#118CFD', '#C3E2FE', '#8ABFFE'],
          hoverBackgroundColor: ['#118CFD', '#C3E2FE', '#8ABFFE'],
          hoverBorderColor: ['#fff', '#fff', '#fff'],
          borderWidth: 3
        }],
        options: {}
      },
      style: {
        margin: 10
      }
    }));
    expect(node.getDOMNode().classList.contains('Metric')).toBe(true);
  });
});