@hackoregon/component-library
Version:
Official repo for Hack Oregon React component library
18 lines • 473 B
JavaScript
import React from "react";
import { shallow } from "enzyme";
import SimpleLegend from "./SimpleLegend";
describe("SimpleLegend", function () {
it("should render a legend when provided data", function () {
var testLegendData = [{
name: "a"
}, {
name: "b"
}, {
name: "c"
}];
var wrapper = shallow(React.createElement(SimpleLegend, {
legendData: testLegendData
}));
expect(wrapper.find("div")).to.have.length(1);
});
});