Convert iD.format.GeoJSON to member functions

This commit is contained in:
John Firebaugh
2013-01-26 21:01:44 -05:00
parent 50b997599d
commit 646c746991
8 changed files with 49 additions and 48 deletions
-17
View File
@@ -1,17 +0,0 @@
describe('iD.format.GeoJSON', function() {
describe('#mapping', function() {
it('converts a node to GeoJSON', function() {
var node = iD.Node({loc: [-77, 38]}),
graph = iD.Graph([node]);
expect(iD.format.GeoJSON.mapping(node, graph).geometry.type).to.equal('Point');
});
it('converts a way to GeoJSON', function() {
var way = iD.Way(),
graph = iD.Graph([way]),
json = iD.format.GeoJSON.mapping(way, graph);
expect(json.type).to.equal('Feature');
expect(json.geometry.type).to.equal('LineString');
});
});
});