import React from "react";
import { mount } from "enzyme";
import Collapsable from "./Collapsable";
describe("Collapsable", function () {
  it("should render all children by default", function () {
    var wrapper = mount(React.createElement(Collapsable, null, React.createElement("h1", null, "test1"), React.createElement("h1", null, "test2")));
    expect(wrapper.find("h1").length).to.eql(2);
  });
  it("should collapse hidden children by default", function () {
    var wrapper = mount(React.createElement(Collapsable, null, React.createElement("h1", null, "test1"), React.createElement("h1", {
      hidden: true
    }, "test2")));
    expect(wrapper.find("h1").length).to.eql(1);
  });
});