mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
add test for geojson sanitation of non-string properties
This commit is contained in:
@@ -22,7 +22,11 @@ describe('iD.svgData', function () {
|
||||
' "area": 19717.8,' +
|
||||
' "name": "New Jersey",' +
|
||||
' "name_en": "New Jersey",' +
|
||||
' "osm_id": 316973311' +
|
||||
' "osm_id": 316973311,' +
|
||||
' "flag": true,' +
|
||||
' "list": [1,2,3],' +
|
||||
' "null": null,' +
|
||||
' "object": {}' +
|
||||
' },' +
|
||||
' "id": 316973311' +
|
||||
' }' +
|
||||
@@ -171,6 +175,11 @@ describe('iD.svgData', function () {
|
||||
path = surface.selectAll('path.stroke');
|
||||
expect(path.nodes().length).to.eql(1);
|
||||
expect(path.attr('d')).to.match(/^M.*z$/);
|
||||
expect(render.geojson().features[0].properties.osm_id).to.be.a('string');
|
||||
expect(render.geojson().features[0].properties.flag).to.be.a('string');
|
||||
expect(render.geojson().features[0].properties.list).to.be.a('string');
|
||||
expect(render.geojson().features[0].properties.null).to.be.a('string');
|
||||
expect(render.geojson().features[0].properties.object).to.be.a('string');
|
||||
done();
|
||||
}, 200);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user