cartodb-4.42/lib/assets/javascripts/cdb/test/spec/geo/geometry.spec.js
2024-04-06 05:25:13 +00:00

16 lines
407 B
JavaScript

describe("Geometry", function() {
it("isPoint should return true when is a point", function() {
var geojsonFeature = {
"type": "Point",
"coordinates": [-104.99404, 39.75621]
};
var g = new cdb.geo.Geometry({
geojson: geojsonFeature
});
expect(g.isPoint()).toEqual(true);
g.set('geojson', {type: 'Polygon'});
expect(g.isPoint()).toEqual(false);
});
});