@hackoregon/component-library
Version:
Official repo for Hack Oregon React component library
24 lines • 585 B
JavaScript
import React from "react";
import { shallow } from "enzyme";
import StackedAreaChart from "./StackedAreaChart";
describe("StackedAreaChart", function () {
var data = [{
year: 2015,
population: 1
}, {
year: 2016,
population: 2
}, {
year: 2017,
population: 3
}];
var defaultProps = {
data: data,
dataKey: "year",
dataValue: "population"
};
it("should render a VictoryChart", function () {
var wrapper = shallow(React.createElement(StackedAreaChart, defaultProps));
expect(wrapper.find("VictoryChart").length).to.eql(1);
});
});