"use strict";

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

var _enzyme = require("enzyme");

var _Collapsable = _interopRequireDefault(require("./Collapsable"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

describe("Collapsable", function () {
  it("should render all children by default", function () {
    var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Collapsable["default"], null, _react["default"].createElement("h1", null, "test1"), _react["default"].createElement("h1", null, "test2")));
    expect(wrapper.find("h1").length).to.eql(2);
  });
  it("should collapse hidden children by default", function () {
    var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Collapsable["default"], null, _react["default"].createElement("h1", null, "test1"), _react["default"].createElement("h1", {
      hidden: true
    }, "test2")));
    expect(wrapper.find("h1").length).to.eql(1);
  });
});