UNPKG

compare-geojson

Version:

Compare a features new and old versions in GeoJSON

99 lines (98 loc) 2.88 kB
{ "compareFunction": "modifiedMonument", "fixtures": [ { "description": "Checks is monument is modified which is > version 10", "newVersion": { "type": "Feature", "properties": { "historic": "monument", "osm:version": 11, "name": "noname" }, "geometry": { "type": "Point", "coordinates": [ 89, 89 ] } }, "oldVersion": { "type": "Feature", "properties": { "historic": "monument", "osm:version": 10, "name": "Taj Mahal" }, "geometry": { "type": "Point", "coordinates": [ 89, 89 ] } }, "expectedResult": { "result:modifiedMonument": true } }, { "description": "Checks if monument > version 10 is deleted", "newVersion": null, "oldVersion": { "type": "Feature", "properties": { "historic": "monument", "osm:version": 11, "name": "Taj Mahal" }, "geometry": { "type": "Point", "coordinates": [ 89, 89 ] } }, "expectedResult": { "result:modifiedMonument": true } }, { "description": "Dont flag if monument version is less than 10", "newVersion": { "type": "Feature", "properties": { "historic": "monument", "osm:version": 9, "name": "Taj Mahal" }, "geometry": { "type": "Point", "coordinates": [ 89, 89 ] } }, "oldVersion": { "type": "Feature", "properties": { "historic": "monument", "osm:version": 8, "name": "Taj Mahal" }, "geometry": { "type": "Point", "coordinates": [ 89, 89 ] } }, "expectedResult": { } } ] }