diff --git a/mapping_geojson_to_osm_tags/babel.config.js b/mapping_geojson_to_osm_tags/babel.config.js new file mode 100644 index 00000000..d96709d1 --- /dev/null +++ b/mapping_geojson_to_osm_tags/babel.config.js @@ -0,0 +1,6 @@ +module.exports = { + presets: [ + ['@babel/preset-env', {targets: {node: 'current'}}], + '@babel/preset-typescript', + ], +}; \ No newline at end of file diff --git a/mapping_geojson_to_osm_tags/coverage/clover.xml b/mapping_geojson_to_osm_tags/coverage/clover.xml index 345b731c..d6179860 100644 --- a/mapping_geojson_to_osm_tags/coverage/clover.xml +++ b/mapping_geojson_to_osm_tags/coverage/clover.xml @@ -1,6 +1,255 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mapping_geojson_to_osm_tags/coverage/coverage-final.json b/mapping_geojson_to_osm_tags/coverage/coverage-final.json index 0967ef42..d817ef28 100644 --- a/mapping_geojson_to_osm_tags/coverage/coverage-final.json +++ b/mapping_geojson_to_osm_tags/coverage/coverage-final.json @@ -1 +1,3 @@ -{} +{"/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/data_other/testing/mappings_to_test.ts": {"path":"/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/data_other/testing/mappings_to_test.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":67}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":3}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":50}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":3}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":52}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":34}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":54}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":34}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":37}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":6}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":11}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":24}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":49}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":33}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":43}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":117}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":18}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":13}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":9}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":5}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":1}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":49}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":34}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":54}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":34}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":37}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":6}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":11}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":24}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":35}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":9}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":5}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1},"branchMap":{},"b":{},"fnMap":{},"f":{}} +,"/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/mappings/engine.ts": {"path":"/home/poule/encrypted/stockage-syncable/www/development/html/scripts/mapping_geojson_to_osm_tags/mappings/engine.ts","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":34}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":0}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":0}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":25}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":20}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":19}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":27}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":25}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":14}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":18}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":22}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":1}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":0}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":22}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":28}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":0}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":32}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":37}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":5}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":0}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":30}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":43}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":5}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":0}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":42}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":0}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":43}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":95}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":61}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":69}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":0}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":50}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":0}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":39}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":0}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":10}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":0}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":36}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":5}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":0}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":7}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":66}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":26}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":25}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":7}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":41}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":0}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":61}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":5}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":0}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":51}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":53}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":0}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":7}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":32}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":25}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":28}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":7}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":77}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":41}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":15}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":27}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":5}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":0}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":66}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":48}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":44}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":18}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":30}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":8}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":0}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":80}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":61}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":72}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":10}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":27}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":5}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":0}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":7}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":82}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":7}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":43}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":35}},"85":{"start":{"line":86,"column":0},"end":{"line":86,"column":161}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":0}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":9}},"88":{"start":{"line":89,"column":0},"end":{"line":89,"column":0}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":68}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":64}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":63}},"92":{"start":{"line":93,"column":0},"end":{"line":93,"column":55}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":77}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":0}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":104}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":134}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":0}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":90}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":0}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":15}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":45}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":51}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":42}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":50}},"105":{"start":{"line":106,"column":0},"end":{"line":106,"column":0}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":58}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":60}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":0}},"109":{"start":{"line":110,"column":0},"end":{"line":110,"column":88}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":0}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":10}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":0}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":44}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":0}},"115":{"start":{"line":116,"column":0},"end":{"line":116,"column":40}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":24}},"117":{"start":{"line":118,"column":0},"end":{"line":118,"column":5}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":0}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":77}},"120":{"start":{"line":121,"column":0},"end":{"line":121,"column":49}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":56}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":143}},"123":{"start":{"line":124,"column":0},"end":{"line":124,"column":35}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":0}},"125":{"start":{"line":126,"column":0},"end":{"line":126,"column":81}},"126":{"start":{"line":127,"column":0},"end":{"line":127,"column":62}},"127":{"start":{"line":128,"column":0},"end":{"line":128,"column":56}},"128":{"start":{"line":129,"column":0},"end":{"line":129,"column":52}},"129":{"start":{"line":130,"column":0},"end":{"line":130,"column":78}},"130":{"start":{"line":131,"column":0},"end":{"line":131,"column":99}},"131":{"start":{"line":132,"column":0},"end":{"line":132,"column":0}},"132":{"start":{"line":133,"column":0},"end":{"line":133,"column":64}},"133":{"start":{"line":134,"column":0},"end":{"line":134,"column":0}},"134":{"start":{"line":135,"column":0},"end":{"line":135,"column":32}},"135":{"start":{"line":136,"column":0},"end":{"line":136,"column":43}},"136":{"start":{"line":137,"column":0},"end":{"line":137,"column":54}},"137":{"start":{"line":138,"column":0},"end":{"line":138,"column":83}},"138":{"start":{"line":139,"column":0},"end":{"line":139,"column":68}},"139":{"start":{"line":140,"column":0},"end":{"line":140,"column":89}},"140":{"start":{"line":141,"column":0},"end":{"line":141,"column":0}},"141":{"start":{"line":142,"column":0},"end":{"line":142,"column":24}},"142":{"start":{"line":143,"column":0},"end":{"line":143,"column":62}},"143":{"start":{"line":144,"column":0},"end":{"line":144,"column":17}},"144":{"start":{"line":145,"column":0},"end":{"line":145,"column":61}},"145":{"start":{"line":146,"column":0},"end":{"line":146,"column":37}},"146":{"start":{"line":147,"column":0},"end":{"line":147,"column":85}},"147":{"start":{"line":148,"column":0},"end":{"line":148,"column":17}},"148":{"start":{"line":149,"column":0},"end":{"line":149,"column":47}},"149":{"start":{"line":150,"column":0},"end":{"line":150,"column":31}},"150":{"start":{"line":151,"column":0},"end":{"line":151,"column":60}},"151":{"start":{"line":152,"column":0},"end":{"line":152,"column":0}},"152":{"start":{"line":153,"column":0},"end":{"line":153,"column":49}},"153":{"start":{"line":154,"column":0},"end":{"line":154,"column":55}},"154":{"start":{"line":155,"column":0},"end":{"line":155,"column":17}},"155":{"start":{"line":156,"column":0},"end":{"line":156,"column":0}},"156":{"start":{"line":157,"column":0},"end":{"line":157,"column":19}},"157":{"start":{"line":158,"column":0},"end":{"line":158,"column":54}},"158":{"start":{"line":159,"column":0},"end":{"line":159,"column":106}},"159":{"start":{"line":160,"column":0},"end":{"line":160,"column":19}},"160":{"start":{"line":161,"column":0},"end":{"line":161,"column":54}},"161":{"start":{"line":162,"column":0},"end":{"line":162,"column":93}},"162":{"start":{"line":163,"column":0},"end":{"line":163,"column":96}},"163":{"start":{"line":164,"column":0},"end":{"line":164,"column":46}},"164":{"start":{"line":165,"column":0},"end":{"line":165,"column":90}},"165":{"start":{"line":166,"column":0},"end":{"line":166,"column":0}},"166":{"start":{"line":167,"column":0},"end":{"line":167,"column":61}},"167":{"start":{"line":168,"column":0},"end":{"line":168,"column":77}},"168":{"start":{"line":169,"column":0},"end":{"line":169,"column":81}},"169":{"start":{"line":170,"column":0},"end":{"line":170,"column":25}},"170":{"start":{"line":171,"column":0},"end":{"line":171,"column":62}},"171":{"start":{"line":172,"column":0},"end":{"line":172,"column":128}},"172":{"start":{"line":173,"column":0},"end":{"line":173,"column":140}},"173":{"start":{"line":174,"column":0},"end":{"line":174,"column":60}},"174":{"start":{"line":175,"column":0},"end":{"line":175,"column":94}},"175":{"start":{"line":176,"column":0},"end":{"line":176,"column":80}},"176":{"start":{"line":177,"column":0},"end":{"line":177,"column":29}},"177":{"start":{"line":178,"column":0},"end":{"line":178,"column":25}},"178":{"start":{"line":179,"column":0},"end":{"line":179,"column":61}},"179":{"start":{"line":180,"column":0},"end":{"line":180,"column":93}},"180":{"start":{"line":181,"column":0},"end":{"line":181,"column":79}},"181":{"start":{"line":182,"column":0},"end":{"line":182,"column":29}},"182":{"start":{"line":183,"column":0},"end":{"line":183,"column":25}},"183":{"start":{"line":184,"column":0},"end":{"line":184,"column":68}},"184":{"start":{"line":185,"column":0},"end":{"line":185,"column":62}},"185":{"start":{"line":186,"column":0},"end":{"line":186,"column":60}},"186":{"start":{"line":187,"column":0},"end":{"line":187,"column":109}},"187":{"start":{"line":188,"column":0},"end":{"line":188,"column":25}},"188":{"start":{"line":189,"column":0},"end":{"line":189,"column":50}},"189":{"start":{"line":190,"column":0},"end":{"line":190,"column":70}},"190":{"start":{"line":191,"column":0},"end":{"line":191,"column":79}},"191":{"start":{"line":192,"column":0},"end":{"line":192,"column":25}},"192":{"start":{"line":193,"column":0},"end":{"line":193,"column":21}},"193":{"start":{"line":194,"column":0},"end":{"line":194,"column":17}},"194":{"start":{"line":195,"column":0},"end":{"line":195,"column":0}},"195":{"start":{"line":196,"column":0},"end":{"line":196,"column":63}},"196":{"start":{"line":197,"column":0},"end":{"line":197,"column":58}},"197":{"start":{"line":198,"column":0},"end":{"line":198,"column":17}},"198":{"start":{"line":199,"column":0},"end":{"line":199,"column":13}},"199":{"start":{"line":200,"column":0},"end":{"line":200,"column":9}},"200":{"start":{"line":201,"column":0},"end":{"line":201,"column":5}},"201":{"start":{"line":202,"column":0},"end":{"line":202,"column":0}},"202":{"start":{"line":203,"column":0},"end":{"line":203,"column":1}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":0,"49":0,"50":0,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":0,"62":0,"63":0,"64":0,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":0,"75":0,"76":0,"77":0,"78":0,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":0,"86":0,"87":0,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":1,"119":1,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":1,"202":1},"branchMap":{"0":{"type":"branch","line":16,"loc":{"start":{"line":16,"column":15},"end":{"line":203,"column":1}},"locations":[{"start":{"line":16,"column":15},"end":{"line":203,"column":1}}]},"1":{"type":"branch","line":19,"loc":{"start":{"line":19,"column":4},"end":{"line":21,"column":5}},"locations":[{"start":{"line":19,"column":4},"end":{"line":21,"column":5}}]},"2":{"type":"branch","line":23,"loc":{"start":{"line":23,"column":4},"end":{"line":25,"column":5}},"locations":[{"start":{"line":23,"column":4},"end":{"line":25,"column":5}}]},"3":{"type":"branch","line":84,"loc":{"start":{"line":84,"column":4},"end":{"line":118,"column":5}},"locations":[{"start":{"line":84,"column":4},"end":{"line":118,"column":5}}]},"4":{"type":"branch","line":85,"loc":{"start":{"line":85,"column":34},"end":{"line":88,"column":9}},"locations":[{"start":{"line":85,"column":34},"end":{"line":88,"column":9}}]},"5":{"type":"branch","line":101,"loc":{"start":{"line":101,"column":8},"end":{"line":118,"column":5}},"locations":[{"start":{"line":101,"column":8},"end":{"line":118,"column":5}}]}},"b":{"0":[1],"1":[1],"2":[1],"3":[1],"4":[0],"5":[0]},"fnMap":{"0":{"name":"","decl":{"start":{"line":16,"column":15},"end":{"line":203,"column":1}},"loc":{"start":{"line":16,"column":15},"end":{"line":203,"column":1}},"line":16},"1":{"name":"_default","decl":{"start":{"line":19,"column":4},"end":{"line":21,"column":5}},"loc":{"start":{"line":19,"column":4},"end":{"line":21,"column":5}},"line":19},"2":{"name":"setConfig","decl":{"start":{"line":23,"column":4},"end":{"line":25,"column":5}},"loc":{"start":{"line":23,"column":4},"end":{"line":25,"column":5}},"line":23},"3":{"name":"mapFeaturePoint","decl":{"start":{"line":27,"column":4},"end":{"line":41,"column":5}},"loc":{"start":{"line":27,"column":4},"end":{"line":41,"column":5}},"line":27},"4":{"name":"isBooleanKey","decl":{"start":{"line":48,"column":4},"end":{"line":51,"column":5}},"loc":{"start":{"line":48,"column":4},"end":{"line":51,"column":5}},"line":48},"5":{"name":"filterFeaturesByOffset","decl":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"loc":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"line":61},"6":{"name":"filterFeaturesByPropertyRegex","decl":{"start":{"line":74,"column":4},"end":{"line":79,"column":5}},"loc":{"start":{"line":74,"column":4},"end":{"line":79,"column":5}},"line":74},"7":{"name":"mapElementFromConf","decl":{"start":{"line":84,"column":4},"end":{"line":118,"column":5}},"loc":{"start":{"line":84,"column":4},"end":{"line":118,"column":5}},"line":84},"8":{"name":"convertProperty","decl":{"start":{"line":120,"column":4},"end":{"line":201,"column":5}},"loc":{"start":{"line":120,"column":4},"end":{"line":201,"column":5}},"line":120}},"f":{"0":1,"1":1,"2":1,"3":0,"4":0,"5":0,"6":0,"7":1,"8":0}} +} diff --git a/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/index.html b/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/index.html new file mode 100644 index 00000000..2860094d --- /dev/null +++ b/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/index.html @@ -0,0 +1,116 @@ + + + + + + Code coverage report for data_other/testing + + + + + + + + + +
+
+

All files data_other/testing

+
+ +
+ 100% + Statements + 34/34 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 34/34 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
mappings_to_test.ts +
+
100%34/34100%0/0100%0/0100%34/34
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/mappings_to_test.ts.html b/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/mappings_to_test.ts.html new file mode 100644 index 00000000..658749a1 --- /dev/null +++ b/mapping_geojson_to_osm_tags/coverage/lcov-report/data_other/testing/mappings_to_test.ts.html @@ -0,0 +1,184 @@ + + + + + + Code coverage report for data_other/testing/mappings_to_test.ts + + + + + + + + + +
+
+

All files / data_other/testing mappings_to_test.ts

+
+ +
+ 100% + Statements + 34/34 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 34/34 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +341x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x
import MappingConfigType from "../../mappings/mapping-config.type";
+ 
+/**
+ * configurations de mapping pour les cas de tests
+ */
+export const mappingRemoveAll: MappingConfigType = {
+    config_name: 'testing config',
+    config_author: 'tykayn <contact@cipherbliss.com>',
+    default_properties_of_point: {
+        'amenity': 'charging_station'
+    },
+    tags: {
+        nom_amenageur: {
+            key_converted: 'autre_nom_amenageur',
+            conditional_values: {
+                'Accessibilité inconnue': {
+                    ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
+                },
+            }
+        }
+    }
+}
+export const mappingIgnore: MappingConfigType = {
+    config_name: 'testing config',
+    config_author: 'tykayn <contact@cipherbliss.com>',
+    default_properties_of_point: {
+        'amenity': 'charging_station'
+    },
+    tags: {
+        nom_amenageur: {
+            ignore_this_data: true,
+        }
+    }
+}
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html b/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html index 320f8649..91cca14f 100644 --- a/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html +++ b/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html @@ -23,30 +23,30 @@
- Unknown% + 46.41% Statements - 0/0 + 110/237
- Unknown% + 66.66% Branches - 0/0 + 4/6
- Unknown% + 44.44% Functions - 0/0 + 4/9
- Unknown% + 46.41% Lines - 0/0 + 110/237
@@ -61,7 +61,7 @@
-
+
@@ -78,7 +78,37 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + +
data_other/testing +
+
100%34/34100%0/0100%0/0100%34/34
mappings +
+
37.43%76/20366.66%4/644.44%4/937.43%76/203
@@ -86,7 +116,7 @@ + + + + + + \ No newline at end of file diff --git a/mapping_geojson_to_osm_tags/coverage/lcov-report/mappings/index.html b/mapping_geojson_to_osm_tags/coverage/lcov-report/mappings/index.html new file mode 100644 index 00000000..51c2aafd --- /dev/null +++ b/mapping_geojson_to_osm_tags/coverage/lcov-report/mappings/index.html @@ -0,0 +1,116 @@ + + + + + + Code coverage report for mappings + + + + + + + + + +
+
+

All files mappings

+
+ +
+ 37.43% + Statements + 76/203 +
+ + +
+ 66.66% + Branches + 4/6 +
+ + +
+ 44.44% + Functions + 4/9 +
+ + +
+ 37.43% + Lines + 76/203 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
engine.ts +
+
37.43%76/20366.66%4/644.44%4/937.43%76/203
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/mapping_geojson_to_osm_tags/coverage/lcov.info b/mapping_geojson_to_osm_tags/coverage/lcov.info index e69de29b..6fc274f1 100644 --- a/mapping_geojson_to_osm_tags/coverage/lcov.info +++ b/mapping_geojson_to_osm_tags/coverage/lcov.info @@ -0,0 +1,279 @@ +TN: +SF:data_other/testing/mappings_to_test.ts +FNF:0 +FNH:0 +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:10,1 +DA:11,1 +DA:12,1 +DA:13,1 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:20,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:28,1 +DA:29,1 +DA:30,1 +DA:31,1 +DA:32,1 +DA:33,1 +DA:34,1 +LF:34 +LH:34 +BRF:0 +BRH:0 +end_of_record +TN: +SF:mappings/engine.ts +FN:16, +FN:19,_default +FN:23,setConfig +FN:27,mapFeaturePoint +FN:48,isBooleanKey +FN:61,filterFeaturesByOffset +FN:74,filterFeaturesByPropertyRegex +FN:84,mapElementFromConf +FN:120,convertProperty +FNF:9 +FNH:4 +FNDA:1, +FNDA:1,_default +FNDA:1,setConfig +FNDA:0,mapFeaturePoint +FNDA:0,isBooleanKey +FNDA:0,filterFeaturesByOffset +FNDA:0,filterFeaturesByPropertyRegex +FNDA:1,mapElementFromConf +FNDA:0,convertProperty +DA:1,1 +DA:2,1 +DA:3,1 +DA:4,1 +DA:5,1 +DA:6,1 +DA:7,1 +DA:8,1 +DA:9,1 +DA:10,1 +DA:11,1 +DA:12,1 +DA:13,1 +DA:14,1 +DA:15,1 +DA:16,1 +DA:17,1 +DA:18,1 +DA:19,1 +DA:20,1 +DA:21,1 +DA:22,1 +DA:23,1 +DA:24,1 +DA:25,1 +DA:26,1 +DA:27,1 +DA:28,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:33,0 +DA:34,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:42,1 +DA:43,1 +DA:44,1 +DA:45,1 +DA:46,1 +DA:47,1 +DA:48,1 +DA:49,0 +DA:50,0 +DA:51,0 +DA:52,1 +DA:53,1 +DA:54,1 +DA:55,1 +DA:56,1 +DA:57,1 +DA:58,1 +DA:59,1 +DA:60,1 +DA:61,1 +DA:62,0 +DA:63,0 +DA:64,0 +DA:65,0 +DA:66,1 +DA:67,1 +DA:68,1 +DA:69,1 +DA:70,1 +DA:71,1 +DA:72,1 +DA:73,1 +DA:74,1 +DA:75,0 +DA:76,0 +DA:77,0 +DA:78,0 +DA:79,0 +DA:80,1 +DA:81,1 +DA:82,1 +DA:83,1 +DA:84,1 +DA:85,1 +DA:86,0 +DA:87,0 +DA:88,0 +DA:89,1 +DA:90,1 +DA:91,1 +DA:92,1 +DA:93,1 +DA:94,1 +DA:95,1 +DA:96,1 +DA:97,1 +DA:98,1 +DA:99,1 +DA:100,1 +DA:101,1 +DA:102,0 +DA:103,0 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:113,0 +DA:114,0 +DA:115,0 +DA:116,0 +DA:117,0 +DA:118,0 +DA:119,1 +DA:120,1 +DA:121,0 +DA:122,0 +DA:123,0 +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:129,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +DA:145,0 +DA:146,0 +DA:147,0 +DA:148,0 +DA:149,0 +DA:150,0 +DA:151,0 +DA:152,0 +DA:153,0 +DA:154,0 +DA:155,0 +DA:156,0 +DA:157,0 +DA:158,0 +DA:159,0 +DA:160,0 +DA:161,0 +DA:162,0 +DA:163,0 +DA:164,0 +DA:165,0 +DA:166,0 +DA:167,0 +DA:168,0 +DA:169,0 +DA:170,0 +DA:171,0 +DA:172,0 +DA:173,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +DA:181,0 +DA:182,0 +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +DA:192,0 +DA:193,0 +DA:194,0 +DA:195,0 +DA:196,0 +DA:197,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:202,1 +DA:203,1 +LF:203 +LH:76 +BRDA:16,0,0,1 +BRDA:19,1,0,1 +BRDA:23,2,0,1 +BRDA:84,3,0,1 +BRDA:85,4,0,0 +BRDA:101,5,0,0 +BRF:6 +BRH:4 +end_of_record diff --git a/mapping_geojson_to_osm_tags/jest.config.ts b/mapping_geojson_to_osm_tags/jest.config.ts index 9a9366a4..0cd36b16 100644 --- a/mapping_geojson_to_osm_tags/jest.config.ts +++ b/mapping_geojson_to_osm_tags/jest.config.ts @@ -1,14 +1,199 @@ -/* - * For a detailed explanation regarding each configuration property and type check, visit: +/** + * For a detailed explanation regarding each configuration property, visit: * https://jestjs.io/docs/configuration */ -module.exports = { - testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|js?|tsx?|ts?)$", - transform: { - "^.+\\.jsx?$": "babel-jest", - "^.+\\.mjs$": "babel-jest", - "^.+\\.ts$": "babel-jest", - }, - testPathIgnorePatterns: ["/build/", "/node_modules/"], - moduleFileExtensions: ["js", "jsx", "mjs"] -} + +import type {Config} from 'jest'; + +const config: Config = { + // All imported modules in your tests should be mocked automatically + // automock: false, + + // Stop running tests after `n` failures + // bail: 0, + + // The directory where Jest should store its cached dependency information + // cacheDirectory: "/tmp/jest_rs", + + // Automatically clear mock calls, instances, contexts and results before every test + clearMocks: true, + + // Indicates whether the coverage information should be collected while executing the test + collectCoverage: true, + + // An array of glob patterns indicating a set of files for which coverage information should be collected + // collectCoverageFrom: undefined, + + // The directory where Jest should output its coverage files + coverageDirectory: "coverage", + + // An array of regexp pattern strings used to skip coverage collection + // coveragePathIgnorePatterns: [ + // "/node_modules/" + // ], + + // Indicates which provider should be used to instrument code for coverage + coverageProvider: "v8", + + // A list of reporter names that Jest uses when writing coverage reports + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], + + // An object that configures minimum threshold enforcement for coverage results + // coverageThreshold: undefined, + + // A path to a custom dependency extractor + // dependencyExtractor: undefined, + + // Make calling deprecated APIs throw helpful error messages + // errorOnDeprecated: false, + + // The default configuration for fake timers + // fakeTimers: { + // "enableGlobally": false + // }, + + // Force coverage collection from ignored files using an array of glob patterns + // forceCoverageMatch: [], + + // A path to a module which exports an async function that is triggered once before all test suites + // globalSetup: undefined, + + // A path to a module which exports an async function that is triggered once after all test suites + // globalTeardown: undefined, + + // A set of global variables that need to be available in all test environments + // globals: {}, + + // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. + // maxWorkers: "50%", + + // An array of directory names to be searched recursively up from the requiring module's location + // moduleDirectories: [ + // "node_modules" + // ], + + // An array of file extensions your modules use + // moduleFileExtensions: [ + // "js", + // "mjs", + // "cjs", + // "jsx", + // "ts", + // "tsx", + // "json", + // "node" + // ], + + // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module + // moduleNameMapper: {}, + + // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader + // modulePathIgnorePatterns: [], + + // Activates notifications for test results + // notify: false, + + // An enum that specifies notification mode. Requires { notify: true } + // notifyMode: "failure-change", + + // A preset that is used as a base for Jest's configuration + // preset: undefined, + + // Run tests from one or more projects + // projects: undefined, + + // Use this configuration option to add custom reporters to Jest + // reporters: undefined, + + // Automatically reset mock state before every test + // resetMocks: false, + + // Reset the module registry before running each individual test + // resetModules: false, + + // A path to a custom resolver + // resolver: undefined, + + // Automatically restore mock state and implementation before every test + // restoreMocks: false, + + // The root directory that Jest should scan for tests and modules within + // rootDir: undefined, + + // A list of paths to directories that Jest should use to search for files in + // roots: [ + // "" + // ], + + // Allows you to use a custom runner instead of Jest's default test runner + // runner: "jest-runner", + + // The paths to modules that run some code to configure or set up the testing environment before each test + // setupFiles: [], + + // A list of paths to modules that run some code to configure or set up the testing framework before each test + // setupFilesAfterEnv: [], + + // The number of seconds after which a test is considered as slow and reported as such in the results. + // slowTestThreshold: 5, + + // A list of paths to snapshot serializer modules Jest should use for snapshot testing + // snapshotSerializers: [], + + // The test environment that will be used for testing + // testEnvironment: "jest-environment-node", + + // Options that will be passed to the testEnvironment + // testEnvironmentOptions: {}, + + // Adds a location field to test results + // testLocationInResults: false, + + // The glob patterns Jest uses to detect test files + // testMatch: [ + // "**/__tests__/**/*.[jt]s?(x)", + // "**/?(*.)+(spec|test).[tj]s?(x)" + // ], + + // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped + // testPathIgnorePatterns: [ + // "/node_modules/" + // ], + + // The regexp pattern or array of patterns that Jest uses to detect test files + // testRegex: [], + + // This option allows the use of a custom results processor + // testResultsProcessor: undefined, + + // This option allows use of a custom test runner + // testRunner: "jest-circus/runner", + + // A map from regular expressions to paths to transformers + // transform: undefined, + + // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation + // transformIgnorePatterns: [ + // "/node_modules/", + // "\\.pnp\\.[^\\/]+$" + // ], + + // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them + // unmockedModulePathPatterns: undefined, + + // Indicates whether each individual test should be reported during the run + // verbose: undefined, + + // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode + // watchPathIgnorePatterns: [], + + // Whether to use watchman for file crawling + // watchman: true, +}; + +export default config; diff --git a/mapping_geojson_to_osm_tags/package.json b/mapping_geojson_to_osm_tags/package.json index 8156f544..efd5efb0 100644 --- a/mapping_geojson_to_osm_tags/package.json +++ b/mapping_geojson_to_osm_tags/package.json @@ -12,8 +12,7 @@ "scripts": { "start": "ts-node convert_to_osm_tags.ts --engine", "filter": "node convert_to_osm_tags.ts --department=76 --engine=true", - "test": "jest --coverage --watch", - "tests": "jest --coverage --watch" + "test": "jest --coverage --watch" }, "dependencies": { "minimist": "^1.2.8", @@ -30,6 +29,7 @@ "jest": "^29.6.2", "loglevel": "^1.8.1", "nodemon": "^2.0.22", + "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "tslib": "^2.6.1", "typescript": "^5.1.6" diff --git a/mapping_geojson_to_osm_tags/pnpm-lock.yaml b/mapping_geojson_to_osm_tags/pnpm-lock.yaml index 959593b7..525f0a5f 100644 --- a/mapping_geojson_to_osm_tags/pnpm-lock.yaml +++ b/mapping_geojson_to_osm_tags/pnpm-lock.yaml @@ -43,6 +43,9 @@ devDependencies: nodemon: specifier: ^2.0.22 version: 2.0.22 + ts-jest: + specifier: ^29.1.1 + version: 29.1.1(@babel/core@7.22.9)(babel-jest@29.6.2)(jest@29.6.2)(typescript@5.1.6) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@20.4.5)(typescript@5.1.6) @@ -1886,6 +1889,13 @@ packages: update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true + /bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + dependencies: + fast-json-stable-stringify: 2.1.0 + dev: true + /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: @@ -2872,6 +2882,10 @@ packages: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true + /lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + dev: true + /loglevel@1.8.1: resolution: {integrity: sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==} engines: {node: '>= 0.6.0'} @@ -3367,6 +3381,41 @@ packages: nopt: 1.0.10 dev: true + /ts-jest@29.1.1(@babel/core@7.22.9)(babel-jest@29.6.2)(jest@29.6.2)(typescript@5.1.6): + resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 + esbuild: '*' + jest: ^29.0.0 + typescript: '>=4.3 <6' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + dependencies: + '@babel/core': 7.22.9 + babel-jest: 29.6.2(@babel/core@7.22.9) + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.6.2(@types/node@20.4.5)(ts-node@10.9.1) + jest-util: 29.6.2 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.5.4 + typescript: 5.1.6 + yargs-parser: 21.1.1 + dev: true + /ts-node@10.9.1(@types/node@20.4.5)(typescript@5.1.6): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true diff --git a/mapping_geojson_to_osm_tags/tests/main.test.js b/mapping_geojson_to_osm_tags/tests/main.test.js index d48fb3fd..e042bc0b 100644 --- a/mapping_geojson_to_osm_tags/tests/main.test.js +++ b/mapping_geojson_to_osm_tags/tests/main.test.js @@ -1,31 +1,29 @@ import mapping_engine from '../mappings/engine.ts' import { mappingRemoveAll } from '../data_other/testing/mappings_to_test' +import * as testingGeoJson from '../data_other/testing/testing.json' + +import { describe, expect, test } from '@jest/globals' describe('mapping properties with rich mapping engine', () => { - test('do not add properties at all when there is nothing in tags of the mapping config', () => { - - }) + // test('do not add properties at all when there is nothing in tags of the mapping config', () => { + // + // }) test('remove all properties when mapping says so', () => { - let Mapping_engine = new mapping_engine(mappingRemoveAll) - let mapped_point = {} - list_of_points.forEach(feature_point => { - mapped_point = Mapping_engine.mapElementFromConf(feature_point) - - }) - - expect(mapped_point.properties).toBeFalsy(); + let mapped_point = { properties: []} + mapped_point = Mapping_engine.mapElementFromConf(testingGeoJson.features[0]) + expect(mapped_point.properties).toBe([]) }) - test('maps simple key to key, and keep the same value', () => { }) - test('ignore one value', () => { }) - test('conditional value', () => { }) - test('conditional transform', () => { }) - test('conditional truthy transform', () => { }) - test('conditional falsy transform', () => { }) + // test('maps simple key to key, and keep the same value', () => { }) + // test('ignore one value', () => { }) + // test('conditional value', () => { }) + // test('conditional transform', () => { }) + // test('conditional truthy transform', () => { }) + // test('conditional falsy transform', () => { }) }) xdescribe('filters points', () => {