diff --git a/coverage/clover.xml b/coverage/clover.xml index 1d63f8fc2..1450696b9 100644 --- a/coverage/clover.xml +++ b/coverage/clover.xml @@ -1,25 +1,25 @@ - - + + - - - - - - - - + + + + + + + + - - - + + + @@ -27,14 +27,14 @@ - + - + - + @@ -42,7 +42,7 @@ - + @@ -61,14 +61,14 @@ - + - - - + + + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json index 71d205b47..7719367ba 100644 --- a/coverage/coverage-final.json +++ b/coverage/coverage-final.json @@ -1,4 +1,4 @@ -{"/Users/alippold/github/mitre/saf/src/utils/global.ts": {"path":"/Users/alippold/github/mitre/saf/src/utils/global.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":39}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":55}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":23}},"5":{"start":{"line":26,"column":13},"end":{"line":26,"column":null}},"6":{"start":{"line":33,"column":13},"end":{"line":33,"column":null}},"7":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"8":{"start":{"line":47,"column":4},"end":{"line":47,"column":null}},"9":{"start":{"line":50,"column":2},"end":{"line":50,"column":null}},"10":{"start":{"line":45,"column":0},"end":{"line":45,"column":16}},"11":{"start":{"line":64,"column":2},"end":{"line":64,"column":null}},"12":{"start":{"line":63,"column":0},"end":{"line":63,"column":16}},"13":{"start":{"line":82,"column":14},"end":{"line":82,"column":32}},"14":{"start":{"line":83,"column":15},"end":{"line":83,"column":27}},"15":{"start":{"line":84,"column":10},"end":{"line":84,"column":21}},"16":{"start":{"line":85,"column":16},"end":{"line":85,"column":33}},"17":{"start":{"line":87,"column":2},"end":{"line":90,"column":3}},"18":{"start":{"line":89,"column":4},"end":{"line":89,"column":null}},"19":{"start":{"line":92,"column":2},"end":{"line":92,"column":null}},"20":{"start":{"line":81,"column":0},"end":{"line":81,"column":16}},"21":{"start":{"line":109,"column":2},"end":{"line":113,"column":3}},"22":{"start":{"line":110,"column":4},"end":{"line":110,"column":null}},"23":{"start":{"line":112,"column":4},"end":{"line":112,"column":null}},"24":{"start":{"line":115,"column":2},"end":{"line":115,"column":null}},"25":{"start":{"line":107,"column":0},"end":{"line":107,"column":16}},"26":{"start":{"line":132,"column":2},"end":{"line":132,"column":null}},"27":{"start":{"line":131,"column":0},"end":{"line":131,"column":16}},"28":{"start":{"line":157,"column":2},"end":{"line":159,"column":3}},"29":{"start":{"line":158,"column":4},"end":{"line":158,"column":null}},"30":{"start":{"line":161,"column":2},"end":{"line":164,"column":3}},"31":{"start":{"line":162,"column":22},"end":{"line":162,"column":89}},"32":{"start":{"line":162,"column":48},"end":{"line":162,"column":65}},"33":{"start":{"line":163,"column":4},"end":{"line":163,"column":null}},"34":{"start":{"line":166,"column":2},"end":{"line":168,"column":3}},"35":{"start":{"line":167,"column":4},"end":{"line":167,"column":null}},"36":{"start":{"line":155,"column":0},"end":{"line":155,"column":16}},"37":{"start":{"line":193,"column":15},"end":{"line":193,"column":17}},"38":{"start":{"line":195,"column":42},"end":{"line":195,"column":99}},"39":{"start":{"line":197,"column":2},"end":{"line":199,"column":3}},"40":{"start":{"line":198,"column":4},"end":{"line":198,"column":null}},"41":{"start":{"line":201,"column":2},"end":{"line":201,"column":null}},"42":{"start":{"line":203,"column":2},"end":{"line":205,"column":3}},"43":{"start":{"line":204,"column":4},"end":{"line":204,"column":null}},"44":{"start":{"line":207,"column":2},"end":{"line":209,"column":3}},"45":{"start":{"line":208,"column":4},"end":{"line":208,"column":null}},"46":{"start":{"line":211,"column":2},"end":{"line":213,"column":3}},"47":{"start":{"line":212,"column":4},"end":{"line":212,"column":null}},"48":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"49":{"start":{"line":216,"column":4},"end":{"line":216,"column":null}},"50":{"start":{"line":219,"column":2},"end":{"line":221,"column":3}},"51":{"start":{"line":220,"column":4},"end":{"line":220,"column":null}},"52":{"start":{"line":223,"column":2},"end":{"line":225,"column":3}},"53":{"start":{"line":224,"column":4},"end":{"line":224,"column":null}},"54":{"start":{"line":227,"column":2},"end":{"line":227,"column":null}},"55":{"start":{"line":192,"column":0},"end":{"line":192,"column":16}},"56":{"start":{"line":255,"column":2},"end":{"line":258,"column":3}},"57":{"start":{"line":256,"column":24},"end":{"line":256,"column":128}},"58":{"start":{"line":256,"column":88},"end":{"line":256,"column":127}},"59":{"start":{"line":257,"column":4},"end":{"line":257,"column":null}},"60":{"start":{"line":260,"column":2},"end":{"line":260,"column":null}},"61":{"start":{"line":251,"column":0},"end":{"line":251,"column":16}},"62":{"start":{"line":286,"column":23},"end":{"line":286,"column":121}},"63":{"start":{"line":287,"column":2},"end":{"line":289,"column":3}},"64":{"start":{"line":288,"column":4},"end":{"line":288,"column":null}},"65":{"start":{"line":285,"column":0},"end":{"line":285,"column":16}}},"fnMap":{"0":{"name":"checkSuffix","decl":{"start":{"line":45,"column":16},"end":{"line":45,"column":27}},"loc":{"start":{"line":45,"column":41},"end":{"line":51,"column":1}}},"1":{"name":"convertFullPathToFilename","decl":{"start":{"line":63,"column":16},"end":{"line":63,"column":41}},"loc":{"start":{"line":63,"column":59},"end":{"line":65,"column":1}}},"2":{"name":"dataURLtoU8Array","decl":{"start":{"line":81,"column":16},"end":{"line":81,"column":32}},"loc":{"start":{"line":81,"column":48},"end":{"line":93,"column":1}}},"3":{"name":"getInstalledPath","decl":{"start":{"line":107,"column":16},"end":{"line":107,"column":32}},"loc":{"start":{"line":107,"column":51},"end":{"line":116,"column":1}}},"4":{"name":"arrayNeededPaths","decl":{"start":{"line":131,"column":16},"end":{"line":131,"column":32}},"loc":{"start":{"line":131,"column":64},"end":{"line":133,"column":1}}},"5":{"name":"extractValueViaPathOrNumber","decl":{"start":{"line":155,"column":16},"end":{"line":155,"column":43}},"loc":{"start":{"line":155,"column":139},"end":{"line":169,"column":1}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":162,"column":40},"end":{"line":162,"column":44}},"loc":{"start":{"line":162,"column":48},"end":{"line":162,"column":65}}},"7":{"name":"getProfileInfo","decl":{"start":{"line":192,"column":16},"end":{"line":192,"column":30}},"loc":{"start":{"line":192,"column":85},"end":{"line":228,"column":1}}},"8":{"name":"getDescription","decl":{"start":{"line":251,"column":16},"end":{"line":251,"column":30}},"loc":{"start":{"line":253,"column":13},"end":{"line":261,"column":1}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":256,"column":42},"end":{"line":256,"column":43}},"loc":{"start":{"line":256,"column":88},"end":{"line":256,"column":127}}},"10":{"name":"checkInput","decl":{"start":{"line":285,"column":16},"end":{"line":285,"column":26}},"loc":{"start":{"line":285,"column":119},"end":{"line":290,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":48,"column":3}}]},"1":{"loc":{"start":{"line":132,"column":9},"end":{"line":132,"column":111}},"type":"cond-expr","locations":[{"start":{"line":132,"column":60},"end":{"line":132,"column":101}},{"start":{"line":132,"column":105},"end":{"line":132,"column":111}}]},"2":{"loc":{"start":{"line":132,"column":60},"end":{"line":132,"column":101}},"type":"cond-expr","locations":[{"start":{"line":132,"column":84},"end":{"line":132,"column":90}},{"start":{"line":132,"column":93},"end":{"line":132,"column":101}}]},"3":{"loc":{"start":{"line":157,"column":2},"end":{"line":159,"column":3}},"type":"if","locations":[{"start":{"line":157,"column":2},"end":{"line":159,"column":3}}]},"4":{"loc":{"start":{"line":161,"column":2},"end":{"line":164,"column":3}},"type":"if","locations":[{"start":{"line":161,"column":2},"end":{"line":164,"column":3}}]},"5":{"loc":{"start":{"line":162,"column":22},"end":{"line":162,"column":89}},"type":"binary-expr","locations":[{"start":{"line":162,"column":22},"end":{"line":162,"column":66}},{"start":{"line":162,"column":70},"end":{"line":162,"column":89}}]},"6":{"loc":{"start":{"line":166,"column":2},"end":{"line":168,"column":3}},"type":"if","locations":[{"start":{"line":166,"column":2},"end":{"line":168,"column":3}}]},"7":{"loc":{"start":{"line":195,"column":42},"end":{"line":195,"column":99}},"type":"cond-expr","locations":[{"start":{"line":195,"column":65},"end":{"line":195,"column":87}},{"start":{"line":195,"column":90},"end":{"line":195,"column":99}}]},"8":{"loc":{"start":{"line":197,"column":2},"end":{"line":199,"column":3}},"type":"if","locations":[{"start":{"line":197,"column":2},"end":{"line":199,"column":3}}]},"9":{"loc":{"start":{"line":197,"column":6},"end":{"line":197,"column":29}},"type":"binary-expr","locations":[{"start":{"line":197,"column":6},"end":{"line":197,"column":17}},{"start":{"line":197,"column":21},"end":{"line":197,"column":29}}]},"10":{"loc":{"start":{"line":203,"column":2},"end":{"line":205,"column":3}},"type":"if","locations":[{"start":{"line":203,"column":2},"end":{"line":205,"column":3}}]},"11":{"loc":{"start":{"line":207,"column":2},"end":{"line":209,"column":3}},"type":"if","locations":[{"start":{"line":207,"column":2},"end":{"line":209,"column":3}}]},"12":{"loc":{"start":{"line":211,"column":2},"end":{"line":213,"column":3}},"type":"if","locations":[{"start":{"line":211,"column":2},"end":{"line":213,"column":3}}]},"13":{"loc":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"type":"if","locations":[{"start":{"line":215,"column":2},"end":{"line":217,"column":3}}]},"14":{"loc":{"start":{"line":219,"column":2},"end":{"line":221,"column":3}},"type":"if","locations":[{"start":{"line":219,"column":2},"end":{"line":221,"column":3}}]},"15":{"loc":{"start":{"line":223,"column":2},"end":{"line":225,"column":3}},"type":"if","locations":[{"start":{"line":223,"column":2},"end":{"line":225,"column":3}}]},"16":{"loc":{"start":{"line":223,"column":6},"end":{"line":223,"column":54}},"type":"binary-expr","locations":[{"start":{"line":223,"column":6},"end":{"line":223,"column":27}},{"start":{"line":223,"column":31},"end":{"line":223,"column":54}}]},"17":{"loc":{"start":{"line":255,"column":2},"end":{"line":258,"column":3}},"type":"if","locations":[{"start":{"line":255,"column":2},"end":{"line":258,"column":3}}]},"18":{"loc":{"start":{"line":257,"column":11},"end":{"line":257,"column":78}},"type":"cond-expr","locations":[{"start":{"line":257,"column":25},"end":{"line":257,"column":41}},{"start":{"line":257,"column":44},"end":{"line":257,"column":78}}]},"19":{"loc":{"start":{"line":260,"column":9},"end":{"line":260,"column":71}},"type":"binary-expr","locations":[{"start":{"line":260,"column":9},"end":{"line":260,"column":26}},{"start":{"line":260,"column":30},"end":{"line":260,"column":71}}]},"20":{"loc":{"start":{"line":287,"column":2},"end":{"line":289,"column":3}},"type":"if","locations":[{"start":{"line":287,"column":2},"end":{"line":289,"column":3}}]},"21":{"loc":{"start":{"line":288,"column":74},"end":{"line":288,"column":107}},"type":"binary-expr","locations":[{"start":{"line":288,"column":74},"end":{"line":288,"column":86}},{"start":{"line":288,"column":90},"end":{"line":288,"column":107}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":4,"5":4,"6":4,"7":2,"8":1,"9":1,"10":4,"11":5,"12":4,"13":1,"14":1,"15":1,"16":1,"17":1,"18":13,"19":1,"20":4,"21":2,"22":2,"23":1,"24":2,"25":4,"26":5,"27":4,"28":4,"29":1,"30":3,"31":2,"32":3,"33":2,"34":1,"35":1,"36":4,"37":5,"38":5,"39":5,"40":2,"41":3,"42":3,"43":3,"44":3,"45":3,"46":3,"47":3,"48":3,"49":3,"50":3,"51":1,"52":3,"53":3,"54":3,"55":4,"56":6,"57":3,"58":4,"59":3,"60":3,"61":4,"62":2,"63":2,"64":2,"65":4},"f":{"0":2,"1":5,"2":1,"3":2,"4":5,"5":4,"6":3,"7":5,"8":6,"9":4,"10":2},"b":{"0":[1],"1":[4,1],"2":[1,3],"3":[1],"4":[2],"5":[2,1],"6":[1],"7":[3,2],"8":[2],"9":[5,4],"10":[3],"11":[3],"12":[3],"13":[3],"14":[1],"15":[3],"16":[3,3],"17":[3],"18":[2,1],"19":[3,1],"20":[2],"21":[2,2]}} +{"/Users/alippold/github/mitre/saf/src/utils/global.ts": {"path":"/Users/alippold/github/mitre/saf/src/utils/global.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":39}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":55}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":23}},"5":{"start":{"line":26,"column":13},"end":{"line":26,"column":null}},"6":{"start":{"line":33,"column":13},"end":{"line":33,"column":null}},"7":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"8":{"start":{"line":47,"column":4},"end":{"line":47,"column":null}},"9":{"start":{"line":50,"column":2},"end":{"line":50,"column":null}},"10":{"start":{"line":45,"column":0},"end":{"line":45,"column":16}},"11":{"start":{"line":64,"column":2},"end":{"line":64,"column":null}},"12":{"start":{"line":63,"column":0},"end":{"line":63,"column":16}},"13":{"start":{"line":82,"column":14},"end":{"line":82,"column":32}},"14":{"start":{"line":83,"column":15},"end":{"line":83,"column":27}},"15":{"start":{"line":84,"column":10},"end":{"line":84,"column":21}},"16":{"start":{"line":85,"column":16},"end":{"line":85,"column":33}},"17":{"start":{"line":87,"column":2},"end":{"line":90,"column":3}},"18":{"start":{"line":89,"column":4},"end":{"line":89,"column":null}},"19":{"start":{"line":92,"column":2},"end":{"line":92,"column":null}},"20":{"start":{"line":81,"column":0},"end":{"line":81,"column":16}},"21":{"start":{"line":109,"column":2},"end":{"line":113,"column":3}},"22":{"start":{"line":110,"column":4},"end":{"line":110,"column":null}},"23":{"start":{"line":112,"column":4},"end":{"line":112,"column":null}},"24":{"start":{"line":115,"column":2},"end":{"line":115,"column":null}},"25":{"start":{"line":107,"column":0},"end":{"line":107,"column":16}},"26":{"start":{"line":132,"column":2},"end":{"line":132,"column":null}},"27":{"start":{"line":131,"column":0},"end":{"line":131,"column":16}},"28":{"start":{"line":157,"column":2},"end":{"line":159,"column":3}},"29":{"start":{"line":158,"column":4},"end":{"line":158,"column":null}},"30":{"start":{"line":161,"column":2},"end":{"line":164,"column":3}},"31":{"start":{"line":162,"column":22},"end":{"line":162,"column":89}},"32":{"start":{"line":162,"column":48},"end":{"line":162,"column":65}},"33":{"start":{"line":163,"column":4},"end":{"line":163,"column":null}},"34":{"start":{"line":166,"column":2},"end":{"line":168,"column":3}},"35":{"start":{"line":167,"column":4},"end":{"line":167,"column":null}},"36":{"start":{"line":155,"column":0},"end":{"line":155,"column":16}},"37":{"start":{"line":193,"column":15},"end":{"line":193,"column":17}},"38":{"start":{"line":195,"column":42},"end":{"line":195,"column":99}},"39":{"start":{"line":197,"column":2},"end":{"line":199,"column":3}},"40":{"start":{"line":198,"column":4},"end":{"line":198,"column":null}},"41":{"start":{"line":201,"column":2},"end":{"line":201,"column":null}},"42":{"start":{"line":203,"column":2},"end":{"line":205,"column":3}},"43":{"start":{"line":204,"column":4},"end":{"line":204,"column":null}},"44":{"start":{"line":207,"column":2},"end":{"line":209,"column":3}},"45":{"start":{"line":208,"column":4},"end":{"line":208,"column":null}},"46":{"start":{"line":211,"column":2},"end":{"line":213,"column":3}},"47":{"start":{"line":212,"column":4},"end":{"line":212,"column":null}},"48":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"49":{"start":{"line":216,"column":4},"end":{"line":216,"column":null}},"50":{"start":{"line":219,"column":2},"end":{"line":221,"column":3}},"51":{"start":{"line":220,"column":4},"end":{"line":220,"column":null}},"52":{"start":{"line":223,"column":2},"end":{"line":225,"column":3}},"53":{"start":{"line":224,"column":4},"end":{"line":224,"column":null}},"54":{"start":{"line":227,"column":2},"end":{"line":227,"column":null}},"55":{"start":{"line":192,"column":0},"end":{"line":192,"column":16}},"56":{"start":{"line":255,"column":2},"end":{"line":258,"column":3}},"57":{"start":{"line":256,"column":24},"end":{"line":256,"column":128}},"58":{"start":{"line":256,"column":88},"end":{"line":256,"column":127}},"59":{"start":{"line":257,"column":4},"end":{"line":257,"column":null}},"60":{"start":{"line":260,"column":2},"end":{"line":260,"column":null}},"61":{"start":{"line":251,"column":0},"end":{"line":251,"column":16}},"62":{"start":{"line":286,"column":23},"end":{"line":286,"column":121}},"63":{"start":{"line":287,"column":2},"end":{"line":289,"column":3}},"64":{"start":{"line":288,"column":4},"end":{"line":288,"column":null}},"65":{"start":{"line":285,"column":0},"end":{"line":285,"column":16}}},"fnMap":{"0":{"name":"checkSuffix","decl":{"start":{"line":45,"column":16},"end":{"line":45,"column":27}},"loc":{"start":{"line":45,"column":41},"end":{"line":51,"column":1}}},"1":{"name":"convertFullPathToFilename","decl":{"start":{"line":63,"column":16},"end":{"line":63,"column":41}},"loc":{"start":{"line":63,"column":59},"end":{"line":65,"column":1}}},"2":{"name":"dataURLtoU8Array","decl":{"start":{"line":81,"column":16},"end":{"line":81,"column":32}},"loc":{"start":{"line":81,"column":48},"end":{"line":93,"column":1}}},"3":{"name":"getInstalledPath","decl":{"start":{"line":107,"column":16},"end":{"line":107,"column":32}},"loc":{"start":{"line":107,"column":51},"end":{"line":116,"column":1}}},"4":{"name":"arrayNeededPaths","decl":{"start":{"line":131,"column":16},"end":{"line":131,"column":32}},"loc":{"start":{"line":131,"column":64},"end":{"line":133,"column":1}}},"5":{"name":"extractValueViaPathOrNumber","decl":{"start":{"line":155,"column":16},"end":{"line":155,"column":43}},"loc":{"start":{"line":155,"column":139},"end":{"line":169,"column":1}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":162,"column":40},"end":{"line":162,"column":44}},"loc":{"start":{"line":162,"column":48},"end":{"line":162,"column":65}}},"7":{"name":"getProfileInfo","decl":{"start":{"line":192,"column":16},"end":{"line":192,"column":30}},"loc":{"start":{"line":192,"column":85},"end":{"line":228,"column":1}}},"8":{"name":"getDescription","decl":{"start":{"line":251,"column":16},"end":{"line":251,"column":30}},"loc":{"start":{"line":253,"column":13},"end":{"line":261,"column":1}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":256,"column":42},"end":{"line":256,"column":43}},"loc":{"start":{"line":256,"column":88},"end":{"line":256,"column":127}}},"10":{"name":"checkInput","decl":{"start":{"line":285,"column":16},"end":{"line":285,"column":26}},"loc":{"start":{"line":285,"column":119},"end":{"line":290,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":48,"column":3}}]},"1":{"loc":{"start":{"line":132,"column":9},"end":{"line":132,"column":111}},"type":"cond-expr","locations":[{"start":{"line":132,"column":60},"end":{"line":132,"column":101}},{"start":{"line":132,"column":105},"end":{"line":132,"column":111}}]},"2":{"loc":{"start":{"line":132,"column":60},"end":{"line":132,"column":101}},"type":"cond-expr","locations":[{"start":{"line":132,"column":84},"end":{"line":132,"column":90}},{"start":{"line":132,"column":93},"end":{"line":132,"column":101}}]},"3":{"loc":{"start":{"line":157,"column":2},"end":{"line":159,"column":3}},"type":"if","locations":[{"start":{"line":157,"column":2},"end":{"line":159,"column":3}}]},"4":{"loc":{"start":{"line":161,"column":2},"end":{"line":164,"column":3}},"type":"if","locations":[{"start":{"line":161,"column":2},"end":{"line":164,"column":3}}]},"5":{"loc":{"start":{"line":162,"column":22},"end":{"line":162,"column":89}},"type":"binary-expr","locations":[{"start":{"line":162,"column":22},"end":{"line":162,"column":66}},{"start":{"line":162,"column":70},"end":{"line":162,"column":89}}]},"6":{"loc":{"start":{"line":166,"column":2},"end":{"line":168,"column":3}},"type":"if","locations":[{"start":{"line":166,"column":2},"end":{"line":168,"column":3}}]},"7":{"loc":{"start":{"line":195,"column":42},"end":{"line":195,"column":99}},"type":"cond-expr","locations":[{"start":{"line":195,"column":65},"end":{"line":195,"column":87}},{"start":{"line":195,"column":90},"end":{"line":195,"column":99}}]},"8":{"loc":{"start":{"line":197,"column":2},"end":{"line":199,"column":3}},"type":"if","locations":[{"start":{"line":197,"column":2},"end":{"line":199,"column":3}}]},"9":{"loc":{"start":{"line":197,"column":6},"end":{"line":197,"column":29}},"type":"binary-expr","locations":[{"start":{"line":197,"column":6},"end":{"line":197,"column":17}},{"start":{"line":197,"column":21},"end":{"line":197,"column":29}}]},"10":{"loc":{"start":{"line":203,"column":2},"end":{"line":205,"column":3}},"type":"if","locations":[{"start":{"line":203,"column":2},"end":{"line":205,"column":3}}]},"11":{"loc":{"start":{"line":207,"column":2},"end":{"line":209,"column":3}},"type":"if","locations":[{"start":{"line":207,"column":2},"end":{"line":209,"column":3}}]},"12":{"loc":{"start":{"line":211,"column":2},"end":{"line":213,"column":3}},"type":"if","locations":[{"start":{"line":211,"column":2},"end":{"line":213,"column":3}}]},"13":{"loc":{"start":{"line":215,"column":2},"end":{"line":217,"column":3}},"type":"if","locations":[{"start":{"line":215,"column":2},"end":{"line":217,"column":3}}]},"14":{"loc":{"start":{"line":219,"column":2},"end":{"line":221,"column":3}},"type":"if","locations":[{"start":{"line":219,"column":2},"end":{"line":221,"column":3}}]},"15":{"loc":{"start":{"line":223,"column":2},"end":{"line":225,"column":3}},"type":"if","locations":[{"start":{"line":223,"column":2},"end":{"line":225,"column":3}}]},"16":{"loc":{"start":{"line":223,"column":6},"end":{"line":223,"column":54}},"type":"binary-expr","locations":[{"start":{"line":223,"column":6},"end":{"line":223,"column":27}},{"start":{"line":223,"column":31},"end":{"line":223,"column":54}}]},"17":{"loc":{"start":{"line":255,"column":2},"end":{"line":258,"column":3}},"type":"if","locations":[{"start":{"line":255,"column":2},"end":{"line":258,"column":3}}]},"18":{"loc":{"start":{"line":257,"column":11},"end":{"line":257,"column":78}},"type":"cond-expr","locations":[{"start":{"line":257,"column":25},"end":{"line":257,"column":41}},{"start":{"line":257,"column":44},"end":{"line":257,"column":78}}]},"19":{"loc":{"start":{"line":260,"column":9},"end":{"line":260,"column":71}},"type":"binary-expr","locations":[{"start":{"line":260,"column":9},"end":{"line":260,"column":26}},{"start":{"line":260,"column":30},"end":{"line":260,"column":71}}]},"20":{"loc":{"start":{"line":287,"column":2},"end":{"line":289,"column":3}},"type":"if","locations":[{"start":{"line":287,"column":2},"end":{"line":289,"column":3}}]},"21":{"loc":{"start":{"line":288,"column":74},"end":{"line":288,"column":107}},"type":"binary-expr","locations":[{"start":{"line":288,"column":74},"end":{"line":288,"column":86}},{"start":{"line":288,"column":90},"end":{"line":288,"column":107}}]}},"s":{"0":7,"1":7,"2":7,"3":7,"4":7,"5":7,"6":7,"7":2,"8":1,"9":1,"10":7,"11":6,"12":7,"13":1,"14":1,"15":1,"16":1,"17":1,"18":13,"19":1,"20":7,"21":2,"22":2,"23":1,"24":2,"25":7,"26":5,"27":7,"28":4,"29":1,"30":3,"31":2,"32":3,"33":2,"34":1,"35":1,"36":7,"37":5,"38":5,"39":5,"40":2,"41":3,"42":3,"43":3,"44":3,"45":3,"46":3,"47":3,"48":3,"49":3,"50":3,"51":1,"52":3,"53":3,"54":3,"55":7,"56":6,"57":3,"58":4,"59":3,"60":3,"61":7,"62":3,"63":3,"64":2,"65":7},"f":{"0":2,"1":6,"2":1,"3":2,"4":5,"5":4,"6":3,"7":5,"8":6,"9":4,"10":3},"b":{"0":[1],"1":[4,1],"2":[1,3],"3":[1],"4":[2],"5":[2,1],"6":[1],"7":[3,2],"8":[2],"9":[5,4],"10":[3],"11":[3],"12":[3],"13":[3],"14":[1],"15":[3],"16":[3,3],"17":[3],"18":[2,1],"19":[3,1],"20":[2],"21":[2,1]}} ,"/Users/alippold/github/mitre/saf/src/utils/logging.ts": {"path":"/Users/alippold/github/mitre/saf/src/utils/logging.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":75}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":81}},"2":{"start":{"line":32,"column":37},"end":{"line":34,"column":null}},"3":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"4":{"start":{"line":37,"column":4},"end":{"line":37,"column":null}},"5":{"start":{"line":40,"column":2},"end":{"line":51,"column":null}},"6":{"start":{"line":48,"column":16},"end":{"line":48,"column":69}},"7":{"start":{"line":31,"column":0},"end":{"line":31,"column":16}},"8":{"start":{"line":61,"column":16},"end":{"line":61,"column":28}},"9":{"start":{"line":62,"column":33},"end":{"line":70,"column":null}},"10":{"start":{"line":71,"column":35},"end":{"line":71,"column":63}},"11":{"start":{"line":72,"column":2},"end":{"line":74,"column":null}},"12":{"start":{"line":73,"column":4},"end":{"line":73,"column":null}},"13":{"start":{"line":75,"column":53},"end":{"line":76,"column":null}},"14":{"start":{"line":76,"column":15},"end":{"line":76,"column":31}},"15":{"start":{"line":78,"column":2},"end":{"line":107,"column":null}},"16":{"start":{"line":79,"column":4},"end":{"line":106,"column":5}},"17":{"start":{"line":81,"column":8},"end":{"line":81,"column":null}},"18":{"start":{"line":82,"column":8},"end":{"line":82,"column":13}},"19":{"start":{"line":86,"column":8},"end":{"line":86,"column":null}},"20":{"start":{"line":87,"column":8},"end":{"line":87,"column":13}},"21":{"start":{"line":91,"column":8},"end":{"line":91,"column":null}},"22":{"start":{"line":92,"column":8},"end":{"line":92,"column":13}},"23":{"start":{"line":96,"column":8},"end":{"line":96,"column":null}},"24":{"start":{"line":97,"column":8},"end":{"line":97,"column":13}},"25":{"start":{"line":101,"column":8},"end":{"line":101,"column":null}},"26":{"start":{"line":102,"column":8},"end":{"line":102,"column":13}},"27":{"start":{"line":108,"column":2},"end":{"line":108,"column":null}},"28":{"start":{"line":109,"column":2},"end":{"line":109,"column":null}},"29":{"start":{"line":60,"column":0},"end":{"line":60,"column":16}}},"fnMap":{"0":{"name":"createWinstonLogger","decl":{"start":{"line":31,"column":16},"end":{"line":31,"column":35}},"loc":{"start":{"line":31,"column":70},"end":{"line":52,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":48,"column":8},"end":{"line":48,"column":12}},"loc":{"start":{"line":48,"column":16},"end":{"line":48,"column":69}}},"2":{"name":"getHDFSummary","decl":{"start":{"line":60,"column":16},"end":{"line":60,"column":29}},"loc":{"start":{"line":60,"column":53},"end":{"line":110,"column":1}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":72,"column":44},"end":{"line":72,"column":51}},"loc":{"start":{"line":72,"column":54},"end":{"line":74,"column":3}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":76,"column":4},"end":{"line":76,"column":11}},"loc":{"start":{"line":76,"column":15},"end":{"line":76,"column":31}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":78,"column":19},"end":{"line":78,"column":26}},"loc":{"start":{"line":78,"column":29},"end":{"line":107,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":31,"column":56},"end":{"line":31,"column":70}},"type":"default-arg","locations":[{"start":{"line":31,"column":64},"end":{"line":31,"column":70}}]},"1":{"loc":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"type":"if","locations":[{"start":{"line":36,"column":2},"end":{"line":38,"column":3}}]},"2":{"loc":{"start":{"line":36,"column":6},"end":{"line":36,"column":103}},"type":"binary-expr","locations":[{"start":{"line":36,"column":7},"end":{"line":36,"column":44}},{"start":{"line":36,"column":48},"end":{"line":36,"column":79}},{"start":{"line":36,"column":84},"end":{"line":36,"column":103}}]},"3":{"loc":{"start":{"line":79,"column":4},"end":{"line":106,"column":5}},"type":"switch","locations":[{"start":{"line":80,"column":6},"end":{"line":83,"column":7}},{"start":{"line":85,"column":6},"end":{"line":88,"column":7}},{"start":{"line":90,"column":6},"end":{"line":93,"column":7}},{"start":{"line":95,"column":6},"end":{"line":98,"column":7}},{"start":{"line":100,"column":6},"end":{"line":103,"column":7}},{"start":{"line":105,"column":6},"end":{"line":105,"column":14}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":0,"5":1,"6":520,"7":1,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":1},"f":{"0":1,"1":520,"2":0,"3":0,"4":0,"5":0},"b":{"0":[1],"1":[0],"2":[1,1,1],"3":[0,0,0,0,0,0]}} ,"/Users/alippold/github/mitre/saf/src/utils/ohdf/outputGenerator.ts": {"path":"/Users/alippold/github/mitre/saf/src/utils/ohdf/outputGenerator.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":19}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":22}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":23}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":64}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":51}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":46}},"6":{"start":{"line":16,"column":55},"end":{"line":16,"column":91}},"7":{"start":{"line":18,"column":13},"end":{"line":18,"column":null}},"8":{"start":{"line":19,"column":13},"end":{"line":19,"column":null}},"9":{"start":{"line":21,"column":13},"end":{"line":28,"column":null}},"10":{"start":{"line":55,"column":2},"end":{"line":55,"column":null}},"11":{"start":{"line":56,"column":18},"end":{"line":56,"column":20}},"12":{"start":{"line":57,"column":2},"end":{"line":72,"column":3}},"13":{"start":{"line":59,"column":6},"end":{"line":59,"column":null}},"14":{"start":{"line":60,"column":6},"end":{"line":60,"column":11}},"15":{"start":{"line":64,"column":29},"end":{"line":64,"column":96}},"16":{"start":{"line":65,"column":6},"end":{"line":65,"column":46}},"17":{"start":{"line":66,"column":6},"end":{"line":66,"column":11}},"18":{"start":{"line":70,"column":6},"end":{"line":70,"column":null}},"19":{"start":{"line":74,"column":2},"end":{"line":76,"column":3}},"20":{"start":{"line":75,"column":4},"end":{"line":75,"column":null}},"21":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"22":{"start":{"line":79,"column":4},"end":{"line":84,"column":5}},"23":{"start":{"line":80,"column":6},"end":{"line":80,"column":null}},"24":{"start":{"line":81,"column":6},"end":{"line":81,"column":null}},"25":{"start":{"line":83,"column":6},"end":{"line":83,"column":null}},"26":{"start":{"line":54,"column":0},"end":{"line":54,"column":16}},"27":{"start":{"line":111,"column":2},"end":{"line":111,"column":null}},"28":{"start":{"line":112,"column":2},"end":{"line":117,"column":null}},"29":{"start":{"line":105,"column":0},"end":{"line":105,"column":16}},"30":{"start":{"line":136,"column":2},"end":{"line":136,"column":null}},"31":{"start":{"line":137,"column":2},"end":{"line":141,"column":null}},"32":{"start":{"line":138,"column":4},"end":{"line":138,"column":null}},"33":{"start":{"line":140,"column":4},"end":{"line":140,"column":null}},"34":{"start":{"line":135,"column":0},"end":{"line":135,"column":16}},"35":{"start":{"line":161,"column":2},"end":{"line":161,"column":null}},"36":{"start":{"line":162,"column":2},"end":{"line":162,"column":null}},"37":{"start":{"line":163,"column":2},"end":{"line":163,"column":null}},"38":{"start":{"line":165,"column":21},"end":{"line":165,"column":59}},"39":{"start":{"line":167,"column":2},"end":{"line":167,"column":null}},"40":{"start":{"line":169,"column":2},"end":{"line":171,"column":3}},"41":{"start":{"line":170,"column":4},"end":{"line":170,"column":null}},"42":{"start":{"line":173,"column":2},"end":{"line":173,"column":null}},"43":{"start":{"line":160,"column":0},"end":{"line":160,"column":16}},"44":{"start":{"line":190,"column":2},"end":{"line":190,"column":null}},"45":{"start":{"line":190,"column":36},"end":{"line":190,"column":68}},"46":{"start":{"line":189,"column":0},"end":{"line":189,"column":16}},"47":{"start":{"line":207,"column":2},"end":{"line":207,"column":null}},"48":{"start":{"line":208,"column":25},"end":{"line":208,"column":27}},"49":{"start":{"line":209,"column":2},"end":{"line":209,"column":null}},"50":{"start":{"line":209,"column":50},"end":{"line":209,"column":90}},"51":{"start":{"line":210,"column":2},"end":{"line":210,"column":null}},"52":{"start":{"line":206,"column":0},"end":{"line":206,"column":16}},"53":{"start":{"line":226,"column":2},"end":{"line":226,"column":null}},"54":{"start":{"line":225,"column":0},"end":{"line":225,"column":16}},"55":{"start":{"line":244,"column":2},"end":{"line":244,"column":null}},"56":{"start":{"line":245,"column":2},"end":{"line":247,"column":3}},"57":{"start":{"line":246,"column":4},"end":{"line":246,"column":null}},"58":{"start":{"line":249,"column":2},"end":{"line":251,"column":3}},"59":{"start":{"line":250,"column":4},"end":{"line":250,"column":null}},"60":{"start":{"line":253,"column":2},"end":{"line":253,"column":null}},"61":{"start":{"line":243,"column":0},"end":{"line":243,"column":16}},"62":{"start":{"line":274,"column":16},"end":{"line":274,"column":42}},"63":{"start":{"line":275,"column":20},"end":{"line":275,"column":159}},"64":{"start":{"line":275,"column":95},"end":{"line":275,"column":157}},"65":{"start":{"line":277,"column":4},"end":{"line":277,"column":112}},"66":{"start":{"line":277,"column":25},"end":{"line":277,"column":111}},"67":{"start":{"line":279,"column":25},"end":{"line":282,"column":null}},"68":{"start":{"line":283,"column":31},"end":{"line":283,"column":113}},"69":{"start":{"line":286,"column":23},"end":{"line":286,"column":101}},"70":{"start":{"line":287,"column":16},"end":{"line":287,"column":58}},"71":{"start":{"line":288,"column":2},"end":{"line":292,"column":null}},"72":{"start":{"line":273,"column":0},"end":{"line":273,"column":16}}},"fnMap":{"0":{"name":"printAndWriteOutput","decl":{"start":{"line":54,"column":16},"end":{"line":54,"column":35}},"loc":{"start":{"line":54,"column":65},"end":{"line":86,"column":1}}},"1":{"name":"createPrintableSummary","decl":{"start":{"line":105,"column":16},"end":{"line":105,"column":38}},"loc":{"start":{"line":109,"column":44},"end":{"line":118,"column":1}}},"2":{"name":"extractResultSets","decl":{"start":{"line":135,"column":16},"end":{"line":135,"column":33}},"loc":{"start":{"line":135,"column":106},"end":{"line":142,"column":1}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":137,"column":42},"end":{"line":137,"column":43}},"loc":{"start":{"line":137,"column":59},"end":{"line":139,"column":3}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":139,"column":9},"end":{"line":139,"column":10}},"loc":{"start":{"line":139,"column":24},"end":{"line":141,"column":3}}},"5":{"name":"generateValue","decl":{"start":{"line":160,"column":16},"end":{"line":160,"column":29}},"loc":{"start":{"line":160,"column":81},"end":{"line":174,"column":1}}},"6":{"name":"generateMarkdownTableRow","decl":{"start":{"line":189,"column":16},"end":{"line":189,"column":40}},"loc":{"start":{"line":189,"column":76},"end":{"line":191,"column":1}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":190,"column":26},"end":{"line":190,"column":32}},"loc":{"start":{"line":190,"column":36},"end":{"line":190,"column":68}}},"8":{"name":"convertToMarkdown","decl":{"start":{"line":206,"column":16},"end":{"line":206,"column":33}},"loc":{"start":{"line":206,"column":73},"end":{"line":211,"column":1}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":209,"column":42},"end":{"line":209,"column":46}},"loc":{"start":{"line":209,"column":50},"end":{"line":209,"column":90}}},"10":{"name":"prettyPrintRowTitle","decl":{"start":{"line":225,"column":16},"end":{"line":225,"column":35}},"loc":{"start":{"line":225,"column":49},"end":{"line":227,"column":1}}},"11":{"name":"prettyPrintColumnTitle","decl":{"start":{"line":243,"column":16},"end":{"line":243,"column":38}},"loc":{"start":{"line":243,"column":52},"end":{"line":254,"column":1}}},"12":{"name":"generateMarkdownTable","decl":{"start":{"line":273,"column":16},"end":{"line":273,"column":37}},"loc":{"start":{"line":273,"column":89},"end":{"line":293,"column":1}}},"13":{"name":"(anonymous_13)","decl":{"start":{"line":275,"column":85},"end":{"line":275,"column":91}},"loc":{"start":{"line":275,"column":95},"end":{"line":275,"column":157}}},"14":{"name":"(anonymous_14)","decl":{"start":{"line":277,"column":18},"end":{"line":277,"column":21}},"loc":{"start":{"line":277,"column":25},"end":{"line":277,"column":111}}}},"branchMap":{"0":{"loc":{"start":{"line":57,"column":2},"end":{"line":72,"column":3}},"type":"switch","locations":[{"start":{"line":58,"column":4},"end":{"line":61,"column":5}},{"start":{"line":63,"column":4},"end":{"line":67,"column":5}},{"start":{"line":69,"column":4},"end":{"line":71,"column":5}}]},"1":{"loc":{"start":{"line":59,"column":18},"end":{"line":59,"column":127}},"type":"cond-expr","locations":[{"start":{"line":59,"column":37},"end":{"line":59,"column":85}},{"start":{"line":59,"column":88},"end":{"line":59,"column":127}}]},"2":{"loc":{"start":{"line":64,"column":72},"end":{"line":64,"column":95}},"type":"binary-expr","locations":[{"start":{"line":64,"column":72},"end":{"line":64,"column":87}},{"start":{"line":64,"column":91},"end":{"line":64,"column":95}}]},"3":{"loc":{"start":{"line":74,"column":2},"end":{"line":76,"column":3}},"type":"if","locations":[{"start":{"line":74,"column":2},"end":{"line":76,"column":3}}]},"4":{"loc":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"type":"if","locations":[{"start":{"line":78,"column":2},"end":{"line":85,"column":3}}]},"5":{"loc":{"start":{"line":169,"column":2},"end":{"line":171,"column":3}},"type":"if","locations":[{"start":{"line":169,"column":2},"end":{"line":171,"column":3}}]},"6":{"loc":{"start":{"line":169,"column":6},"end":{"line":169,"column":37}},"type":"binary-expr","locations":[{"start":{"line":169,"column":6},"end":{"line":169,"column":16}},{"start":{"line":169,"column":20},"end":{"line":169,"column":37}}]},"7":{"loc":{"start":{"line":209,"column":11},"end":{"line":209,"column":136}},"type":"cond-expr","locations":[{"start":{"line":209,"column":33},"end":{"line":209,"column":91}},{"start":{"line":209,"column":94},"end":{"line":209,"column":136}}]},"8":{"loc":{"start":{"line":245,"column":2},"end":{"line":247,"column":3}},"type":"if","locations":[{"start":{"line":245,"column":2},"end":{"line":247,"column":3}}]},"9":{"loc":{"start":{"line":249,"column":2},"end":{"line":251,"column":3}},"type":"if","locations":[{"start":{"line":249,"column":2},"end":{"line":251,"column":3}}]},"10":{"loc":{"start":{"line":286,"column":23},"end":{"line":286,"column":101}},"type":"cond-expr","locations":[{"start":{"line":286,"column":62},"end":{"line":286,"column":78}},{"start":{"line":286,"column":81},"end":{"line":286,"column":101}}]},"11":{"loc":{"start":{"line":287,"column":16},"end":{"line":287,"column":58}},"type":"cond-expr","locations":[{"start":{"line":287,"column":30},"end":{"line":287,"column":53}},{"start":{"line":287,"column":56},"end":{"line":287,"column":58}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":1,"27":0,"28":0,"29":1,"30":0,"31":0,"32":0,"33":0,"34":1,"35":130,"36":130,"37":130,"38":130,"39":130,"40":130,"41":109,"42":21,"43":1,"44":26,"45":130,"46":1,"47":0,"48":0,"49":0,"50":0,"51":0,"52":1,"53":30,"54":1,"55":28,"56":28,"57":6,"58":22,"59":6,"60":16,"61":1,"62":5,"63":5,"64":25,"65":5,"66":25,"67":5,"68":5,"69":5,"70":5,"71":5,"72":1},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":130,"6":26,"7":130,"8":0,"9":0,"10":30,"11":28,"12":5,"13":25,"14":25},"b":{"0":[0,0,0],"1":[0,0],"2":[0,0],"3":[0],"4":[0],"5":[109],"6":[130,130],"7":[0,0],"8":[6],"9":[6],"10":[5,0],"11":[5,0]}} } diff --git a/coverage/lcov.info b/coverage/lcov.info index 869ac49c8..6820fbdbd 100644 --- a/coverage/lcov.info +++ b/coverage/lcov.info @@ -14,7 +14,7 @@ FN:285,checkInput FNF:11 FNH:11 FNDA:2,checkSuffix -FNDA:5,convertFullPathToFilename +FNDA:6,convertFullPathToFilename FNDA:1,dataURLtoU8Array FNDA:2,getInstalledPath FNDA:5,arrayNeededPaths @@ -23,21 +23,21 @@ FNDA:3,(anonymous_6) FNDA:5,getProfileInfo FNDA:6,getDescription FNDA:4,(anonymous_9) -FNDA:2,checkInput -DA:1,4 -DA:2,4 -DA:3,4 -DA:5,4 -DA:6,4 -DA:26,4 -DA:33,4 -DA:45,4 +FNDA:3,checkInput +DA:1,7 +DA:2,7 +DA:3,7 +DA:5,7 +DA:6,7 +DA:26,7 +DA:33,7 +DA:45,7 DA:46,2 DA:47,1 DA:50,1 -DA:63,4 -DA:64,5 -DA:81,4 +DA:63,7 +DA:64,6 +DA:81,7 DA:82,1 DA:83,1 DA:84,1 @@ -45,14 +45,14 @@ DA:85,1 DA:87,1 DA:89,13 DA:92,1 -DA:107,4 +DA:107,7 DA:109,2 DA:110,2 DA:112,1 DA:115,2 -DA:131,4 +DA:131,7 DA:132,5 -DA:155,4 +DA:155,7 DA:157,4 DA:158,1 DA:161,3 @@ -60,7 +60,7 @@ DA:162,3 DA:163,2 DA:166,1 DA:167,1 -DA:192,4 +DA:192,7 DA:193,5 DA:195,5 DA:197,5 @@ -79,14 +79,14 @@ DA:220,1 DA:223,3 DA:224,3 DA:227,3 -DA:251,4 +DA:251,7 DA:255,6 DA:256,4 DA:257,3 DA:260,3 -DA:285,4 -DA:286,2 -DA:287,2 +DA:285,7 +DA:286,3 +DA:287,3 DA:288,2 LF:64 LH:64 @@ -120,7 +120,7 @@ BRDA:260,19,0,3 BRDA:260,19,1,1 BRDA:287,20,0,2 BRDA:288,21,0,2 -BRDA:288,21,1,2 +BRDA:288,21,1,1 BRF:31 BRH:31 end_of_record diff --git a/test/utils/__tests__/global.test.ts b/test/utils/__tests__/global.test.ts index b9b2d0141..e57677805 100644 --- a/test/utils/__tests__/global.test.ts +++ b/test/utils/__tests__/global.test.ts @@ -321,10 +321,15 @@ describe('checkInput', () => { }) it('should not throw an error when the detected type matches the desired type', () => { - // eslint-disable-next-line node/no-missing-require, unicorn/prefer-module + // eslint-disable-next-line unicorn/prefer-module const {fingerprint} = require('@mitre/hdf-converters') fingerprint.mockReturnValue('text') + // eslint-disable-next-line unicorn/prefer-module + const hdfConverters = require('@mitre/hdf-converters') + // eslint-disable-next-line node/no-missing-require, unicorn/prefer-module + const {checkInput} = require('../../../src/utils/global') + const guessOptions = {data: 'file data', filename: 'file.txt'} const desiredType = 'text' const desiredFormat = 'txt' @@ -333,10 +338,15 @@ describe('checkInput', () => { }) it('should throw an error when the detected type does not match the desired type', () => { - // eslint-disable-next-line node/no-missing-require, unicorn/prefer-module + // eslint-disable-next-line unicorn/prefer-module const {fingerprint} = require('@mitre/hdf-converters') fingerprint.mockReturnValue('image') + // eslint-disable-next-line unicorn/prefer-module + const hdfConverters = require('@mitre/hdf-converters') + // eslint-disable-next-line node/no-missing-require, unicorn/prefer-module + const {checkInput} = require('../../../src/utils/global') + const guessOptions = {data: 'file data', filename: 'file.txt'} const desiredType = 'text' const desiredFormat = 'txt' @@ -345,4 +355,23 @@ describe('checkInput', () => { 'Unable to process input file\nDetected input type: image\nPlease ensure the input is a valid txt', ) }) + + it('should throw an error when the detected type is unknown', () => { + // eslint-disable-next-line unicorn/prefer-module + const {fingerprint} = require('@mitre/hdf-converters') + fingerprint.mockReturnValue(null) + + // eslint-disable-next-line unicorn/prefer-module + const hdfConverters = require('@mitre/hdf-converters') + // eslint-disable-next-line node/no-missing-require, unicorn/prefer-module + const {checkInput} = require('../../../src/utils/global') + + const guessOptions = {data: 'file data', filename: 'file.txt'} + const desiredType = 'text' + const desiredFormat = 'txt' + + expect(() => checkInput(guessOptions, desiredType, desiredFormat)).toThrow( + 'Unable to process input file\nDetected input type: unknown or none\nPlease ensure the input is a valid txt', + ) + }) })