"use strict";

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

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

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

describe('MetricsListItem', function () {
  var testbed = createTestbed(_.default, {
    label: 'Label',
    value: '999.9'
  });
  shouldRenderComponent(testbed, {}, _.default);
  it('should render label text', function () {
    testbed.render();
    expect(testbed.getText()).to.include('Label');
  });
  it('should render value text', function () {
    testbed.render();
    expect(testbed.getText()).to.include('999.9');
  });
  it('should accept components as value', function () {
    testbed.render({
      value: _react.default.createElement("span", null, "1/2")
    });
    expect(testbed.getText()).to.include('1/2');
  });
  it('should render no value', function () {
    testbed.render({
      value: null
    });
    expect(testbed.getText()).to.include('No value');
    expect(testbed.getText()).to.include('--');
  });
});