Files
iD/test/spec/GeoJSON.js
Tom MacWright 2b38b38313 Fixup tests
2012-11-06 16:23:50 -05:00

15 lines
531 B
JavaScript

describe('GeoJSON', function() {
describe('#mapping', function() {
it('should be able to map a node to geojson', function() {
expect(iD.GeoJSON.mapping({ type: 'node', lat: 38, lon: -77 }).geometry.type).toEqual('Point');
});
it('should be able to map a way to geojson', function() {
var way = { type: 'way', nodes: [] };
var gj = iD.GeoJSON.mapping(way);
expect(gj.type).toEqual('Feature');
expect(gj.geometry.type).toEqual('LineString');
});
});
});