import React from "react";
import { shallow } from "enzyme";
import IconMap from "./IconMap";
describe("IconMap", function () {
  var data = [{
    type: "Feature",
    geometry: {
      type: "Point",
      coordinates: [0, 0]
    },
    properties: {
      name: "Null Island"
    }
  }];
  var viewport = {
    zoom: 9.5
  };

  var iconSizeScale = function iconSizeScale(zoom) {
    return zoom > 9.5 ? 25 : 5;
  };

  var defaultProps = {
    data: data,
    viewport: viewport,
    iconSizeScale: iconSizeScale
  };
  it("should render a DeckGL component", function () {
    var wrapper = shallow(React.createElement(IconMap, defaultProps));
    expect(wrapper.find(".DeckGL")).to.have.length(1);
  });
  it("should render child IconMap component", function () {
    var wrapper = shallow(React.createElement(IconMap, defaultProps));
    expect(wrapper.find(".DeckGL").children()).to.have.length(1);
    expect(wrapper.find(".IconMap")).to.have.length(1);
  });
});