@hackoregon/component-library
Version:
Official repo for Hack Oregon React component library
13 lines • 447 B
JavaScript
import React from "react";
import { shallow } from "enzyme";
import Button from "./Button";
describe("Button", function () {
var testString = "Hello";
var wrapper = shallow(React.createElement(Button, null, testString));
it("should render a button", function () {
expect(wrapper.find("button")).to.have.length(1);
});
it("should have the appropriate child text", function () {
expect(wrapper.text()).to.eql(testString);
});
});