"use strict";

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

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

var _enzyme = require("enzyme");

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

describe('ShowMore', function () {
  var node = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_["default"], null, "Hello, world."));
  var classes = node.getDOMNode().classList;
  it('to display a .ShowMore element.', function () {
    expect(classes.contains('ShowMore')).toBe(true);
  });
  it('to toggle the open state.', function () {
    var openState = {
      was: node.state().open
    };
    node.find('.ShowMore-toggle').simulate('click');
    openState.is = node.state().open;
    expect(openState.is).toBe(!openState.was);
  });
});