UNPKG

@hackoregon/component-library

Version:

Official repo for Hack Oregon React component library

27 lines 798 B
import React from "react"; import { shallow } from "enzyme"; import PathMap from "./PathMap"; describe("PathMap", function () { var data = [{ type: "Feature", geometry: { type: "LineString", coordinates: [[0, 0], [1, 1]] }, properties: { name: "Null Island" } }]; var defaultProps = { data: data }; it("should render a DeckGL component", function () { var wrapper = shallow(React.createElement(PathMap, defaultProps)); expect(wrapper.find(".DeckGL")).to.have.length(1); }); it("should render child PathMap component", function () { var wrapper = shallow(React.createElement(PathMap, defaultProps)); expect(wrapper.find(".DeckGL").children()).to.have.length(1); expect(wrapper.find(".PathMap")).to.have.length(1); }); });