diff --git a/test/test.js b/test/test.js index 826281c..afc86b5 100644 --- a/test/test.js +++ b/test/test.js @@ -382,5 +382,16 @@ describe('GeoJSON', function() { expect(function(){ GeoJSON.parse(data, options); }).to.not.throwException(); }); + + + it("converts string coordinates into numbers", function() { + var data = [{ lat: '39.343', lng: '-74.454'}]; + var output = GeoJSON.parse(data, {Point: ['lat', 'lng']}); + + output.features.forEach(function(feature) { + expect(feature.geometry.coordinates[0]).to.be.a('number'); + expect(feature.geometry.coordinates[1]).to.be.a('number'); + }); + }); }); });