"use strict";

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _IconMap = _interopRequireDefault(require("./IconMap"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

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 = (0, _enzyme.shallow)(_react["default"].createElement(_IconMap["default"], defaultProps));
    expect(wrapper.find(".DeckGL")).to.have.length(1);
  });
  it("should render child IconMap component", function () {
    var wrapper = (0, _enzyme.shallow)(_react["default"].createElement(_IconMap["default"], defaultProps));
    expect(wrapper.find(".DeckGL").children()).to.have.length(1);
    expect(wrapper.find(".IconMap")).to.have.length(1);
  });
});