@ellipticltd/aml-utils 0.15.4 → 0.15.5-SCR-812

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.nyc_output/43e358d0-76a0-402c-b32e-26a347513bb4.json +1 -0
  2. package/.nyc_output/f8c694f5-2b17-4e37-9079-32079e715296.json +1 -0
  3. package/.nyc_output/processinfo/14c71e42-4ce7-487c-be9f-95228038c7ec.json +1 -0
  4. package/.nyc_output/processinfo/43e358d0-76a0-402c-b32e-26a347513bb4.json +1 -0
  5. package/.nyc_output/processinfo/470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json +1 -0
  6. package/.nyc_output/processinfo/f8c694f5-2b17-4e37-9079-32079e715296.json +1 -0
  7. package/.nyc_output/processinfo/index.json +1 -1
  8. package/coverage/errors/errors.js.html +1 -1
  9. package/coverage/errors/errors.spec.js.html +15 -15
  10. package/coverage/errors/index.html +12 -12
  11. package/coverage/file-parser/__tests/file-parser.spec.js.html +96 -96
  12. package/coverage/file-parser/__tests/index.html +32 -32
  13. package/coverage/file-parser/__tests/parse-row.spec.js.html +36 -36
  14. package/coverage/file-parser/__tests/sanitize-rows.spec.js.html +49 -49
  15. package/coverage/formatting/formatting.js.html +21 -21
  16. package/coverage/formatting/formatting.spec.js.html +30 -30
  17. package/coverage/formatting/index.html +28 -28
  18. package/coverage/index.html +54 -54
  19. package/coverage/middleware/index.html +1 -1
  20. package/coverage/middleware/middleware.js.html +1 -1
  21. package/coverage/orm-helpers/index.html +26 -26
  22. package/coverage/orm-helpers/ormHelpers.js.html +24 -24
  23. package/coverage/orm-helpers/ormHelpers.spec.js.html +9 -9
  24. package/coverage/types/index.html +1 -1
  25. package/coverage/types/types.js.html +1 -1
  26. package/coverage/validations/index.html +30 -30
  27. package/coverage/validations/validations.js.html +545 -236
  28. package/coverage/validations/validations.spec.js.html +525 -159
  29. package/dist/validations/validations.d.ts +6 -0
  30. package/dist/validations/validations.js +8 -0
  31. package/dist/validations/validations.spec.js +11 -0
  32. package/lib/validations/validations.js +8 -0
  33. package/lib/validations/validations.spec.js +16 -0
  34. package/package.json +1 -1
  35. package/.idea/aml-utils.iml +0 -12
  36. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  37. package/.idea/modules.xml +0 -8
  38. package/.idea/vcs.xml +0 -6
  39. package/.nyc_output/62fbf615-4746-451c-aa0c-c12cb22b7a9d.json +0 -1
  40. package/.nyc_output/fd0c5a49-1dee-497a-bd75-dcf009fcab1e.json +0 -1
  41. package/.nyc_output/processinfo/1aa97f38-9e09-4229-9e02-5f7fa02f213b.json +0 -1
  42. package/.nyc_output/processinfo/62fbf615-4746-451c-aa0c-c12cb22b7a9d.json +0 -1
  43. package/.nyc_output/processinfo/b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7.json +0 -1
  44. package/.nyc_output/processinfo/fd0c5a49-1dee-497a-bd75-dcf009fcab1e.json +0 -1
  45. /package/.nyc_output/{1aa97f38-9e09-4229-9e02-5f7fa02f213b.json → 14c71e42-4ce7-487c-be9f-95228038c7ec.json} +0 -0
  46. /package/.nyc_output/{b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7.json → 470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json} +0 -0
@@ -0,0 +1 @@
1
+ {"uuid":"14c71e42-4ce7-487c-be9f-95228038c7ec","parent":"470a2eff-bd46-45ef-bfd6-70c01fe4c9b3","pid":15988,"argv":["/Users/mateusz.zareba/.nvm/versions/node/v10.1.0/bin/node","/Users/mateusz.zareba/Code/aml-utils/node_modules/.bin/ts-mocha","--reporter","spec","lib/**/*.spec.js","--watch-extensions","js,ts"],"execArgv":[],"cwd":"/Users/mateusz.zareba/Code/aml-utils","time":1669630161429,"ppid":15987,"root":"53adef4c-ffa1-418d-91c3-a8861c03b1d7","coverageFilename":"/Users/mateusz.zareba/Code/aml-utils/.nyc_output/14c71e42-4ce7-487c-be9f-95228038c7ec.json","files":[]}
@@ -0,0 +1 @@
1
+ {"uuid":"43e358d0-76a0-402c-b32e-26a347513bb4","parent":null,"pid":"15984","argv":["/Users/mateusz.zareba/.nvm/versions/node/v10.1.0/bin/node","/Users/mateusz.zareba/Code/aml-utils/node_modules/.bin/nyc","npm","run","test:unit"],"execArgv":[],"cwd":"/Users/mateusz.zareba/Code/aml-utils","time":1669630159911,"ppid":null,"root":null,"coverageFilename":"/Users/mateusz.zareba/Code/aml-utils/.nyc_output/43e358d0-76a0-402c-b32e-26a347513bb4.json","files":["/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.js","/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/file-parser.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/parse-row.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/sanitize-rows.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.js","/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/middleware/middleware.js","/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.js","/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/types/types.js","/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.js","/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.spec.js"]}
@@ -0,0 +1 @@
1
+ {"uuid":"470a2eff-bd46-45ef-bfd6-70c01fe4c9b3","parent":null,"pid":15987,"argv":["/Users/mateusz.zareba/.nvm/versions/node/v10.1.0/bin/node","/Users/mateusz.zareba/Code/aml-utils/node_modules/.bin/npm","run","test:unit"],"execArgv":[],"cwd":"/Users/mateusz.zareba/Code/aml-utils","time":1669630160850,"ppid":15984,"root":"53adef4c-ffa1-418d-91c3-a8861c03b1d7","coverageFilename":"/Users/mateusz.zareba/Code/aml-utils/.nyc_output/470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json","files":[]}
@@ -0,0 +1 @@
1
+ {"uuid":"f8c694f5-2b17-4e37-9079-32079e715296","parent":"14c71e42-4ce7-487c-be9f-95228038c7ec","pid":15989,"argv":["/Users/mateusz.zareba/.nvm/versions/node/v10.1.0/bin/node","/Users/mateusz.zareba/Code/aml-utils/node_modules/mocha/bin/mocha","-r","/Users/mateusz.zareba/Code/aml-utils/node_modules/ts-mocha/src/index.js","--reporter","spec","lib/**/*.spec.js","--watch-extensions","js,ts"],"execArgv":[],"cwd":"/Users/mateusz.zareba/Code/aml-utils","time":1669630161770,"ppid":15988,"root":"53adef4c-ffa1-418d-91c3-a8861c03b1d7","coverageFilename":"/Users/mateusz.zareba/Code/aml-utils/.nyc_output/f8c694f5-2b17-4e37-9079-32079e715296.json","files":["/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/file-parser.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/parse-row.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/sanitize-rows.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.js","/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.js","/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.spec.js","/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.js"]}
@@ -1 +1 @@
1
- {"processes":{"1aa97f38-9e09-4229-9e02-5f7fa02f213b":{"parent":"b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7","children":["62fbf615-4746-451c-aa0c-c12cb22b7a9d"]},"62fbf615-4746-451c-aa0c-c12cb22b7a9d":{"parent":"1aa97f38-9e09-4229-9e02-5f7fa02f213b","children":[]},"b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7":{"parent":null,"children":["1aa97f38-9e09-4229-9e02-5f7fa02f213b"]},"fd0c5a49-1dee-497a-bd75-dcf009fcab1e":{"parent":null,"children":[]}},"files":{"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/errors/errors.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/errors/errors.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/file-parser/__tests/file-parser.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/file-parser/__tests/parse-row.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/file-parser/__tests/sanitize-rows.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/formatting/formatting.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/formatting/formatting.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/orm-helpers/ormHelpers.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/orm-helpers/ormHelpers.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/validations/validations.spec.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/validations/validations.js":["62fbf615-4746-451c-aa0c-c12cb22b7a9d","fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/middleware/middleware.js":["fd0c5a49-1dee-497a-bd75-dcf009fcab1e"],"/Users/dominic.holm-kander/WebstormProjects/aml-utils/lib/types/types.js":["fd0c5a49-1dee-497a-bd75-dcf009fcab1e"]},"externalIds":{}}
1
+ {"processes":{"14c71e42-4ce7-487c-be9f-95228038c7ec":{"parent":"470a2eff-bd46-45ef-bfd6-70c01fe4c9b3","children":["f8c694f5-2b17-4e37-9079-32079e715296"]},"43e358d0-76a0-402c-b32e-26a347513bb4":{"parent":null,"children":[]},"470a2eff-bd46-45ef-bfd6-70c01fe4c9b3":{"parent":null,"children":["14c71e42-4ce7-487c-be9f-95228038c7ec"]},"f8c694f5-2b17-4e37-9079-32079e715296":{"parent":"14c71e42-4ce7-487c-be9f-95228038c7ec","children":[]}},"files":{"/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/errors/errors.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/file-parser.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/parse-row.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/file-parser/__tests/sanitize-rows.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/formatting/formatting.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/middleware/middleware.js":["43e358d0-76a0-402c-b32e-26a347513bb4"],"/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/orm-helpers/ormHelpers.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/types/types.js":["43e358d0-76a0-402c-b32e-26a347513bb4"],"/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"],"/Users/mateusz.zareba/Code/aml-utils/lib/validations/validations.spec.js":["43e358d0-76a0-402c-b32e-26a347513bb4","f8c694f5-2b17-4e37-9079-32079e715296"]},"externalIds":{}}
@@ -211,7 +211,7 @@ module.exports = {
211
211
  </div><!-- /wrapper -->
212
212
  <div class='footer quiet pad2 space-top1 center small'>
213
213
  Code coverage
214
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed May 05 2021 10:40:15 GMT+0100 (BST)
214
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Oct 18 2022 17:03:56 GMT+0200 (CEST)
215
215
  </div>
216
216
  </div>
217
217
  <script src="../prettify.js"></script>
@@ -20,9 +20,9 @@
20
20
  </h1>
21
21
  <div class='clearfix'>
22
22
  <div class='fl pad1y space-right2'>
23
- <span class="strong">64% </span>
23
+ <span class="strong">100% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>16/25</span>
25
+ <span class='fraction'>25/25</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
28
  <span class="strong">100% </span>
@@ -30,9 +30,9 @@
30
30
  <span class='fraction'>0/0</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">40% </span>
33
+ <span class="strong">100% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>6/15</span>
35
+ <span class='fraction'>15/15</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
38
  <span class="strong">100% </span>
@@ -44,7 +44,7 @@
44
44
  Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
45
45
  </p>
46
46
  </div>
47
- <div class='status-line medium'></div>
47
+ <div class='status-line high'></div>
48
48
  <pre><table class="coverage">
49
49
  <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
50
50
  <a name='L2'></a><a href='#L2'>2</a>
@@ -130,30 +130,30 @@
130
130
  &nbsp;
131
131
  describe('lib/error', () =&gt; {
132
132
  describe('RequestError', () =&gt; {
133
- it('should inherit from Error', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >(new RequestError instanceof Error).should.be.true)</span>;
133
+ it('should inherit from Error', () =&gt; (new RequestError instanceof Error).should.be.true);
134
134
  &nbsp;
135
135
  describe('Forbidden Error', () =&gt; {
136
- it('should inherit from Error', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new Forbidden instanceof Error)</span>;
136
+ it('should inherit from Error', () =&gt; new Forbidden instanceof Error);
137
137
  &nbsp;
138
- return it('should inherit from RequestError', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new Forbidden instanceof RequestError)</span>;
138
+ return it('should inherit from RequestError', () =&gt; new Forbidden instanceof RequestError);
139
139
  });
140
140
  &nbsp;
141
141
  describe('Unauthorized Error', () =&gt; {
142
- it('should inherit from Error', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new Unauthorized instanceof Error)</span>;
142
+ it('should inherit from Error', () =&gt; new Unauthorized instanceof Error);
143
143
  &nbsp;
144
- return it('should inherit from RequestError', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new Unauthorized instanceof RequestError)</span>;
144
+ return it('should inherit from RequestError', () =&gt; new Unauthorized instanceof RequestError);
145
145
  });
146
146
  &nbsp;
147
147
  describe('BadRequest Error', () =&gt; {
148
- it('should inherit from Error', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new BadRequest instanceof Error)</span>;
148
+ it('should inherit from Error', () =&gt; new BadRequest instanceof Error);
149
149
  &nbsp;
150
- return it('should inherit from RequestError', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new BadRequest instanceof RequestError)</span>;
150
+ return it('should inherit from RequestError', () =&gt; new BadRequest instanceof RequestError);
151
151
  });
152
152
  &nbsp;
153
153
  return describe('NotFound Error', () =&gt; {
154
- it('should inherit from Error', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new NotFound instanceof Error)</span>;
154
+ it('should inherit from Error', () =&gt; new NotFound instanceof Error);
155
155
  &nbsp;
156
- return it('should inherit from RequestError', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >new NotFound instanceof RequestError)</span>;
156
+ return it('should inherit from RequestError', () =&gt; new NotFound instanceof RequestError);
157
157
  });
158
158
  });
159
159
  });
@@ -163,7 +163,7 @@ describe('lib/error', () =&gt; {
163
163
  </div><!-- /wrapper -->
164
164
  <div class='footer quiet pad2 space-top1 center small'>
165
165
  Code coverage
166
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed May 05 2021 10:40:15 GMT+0100 (BST)
166
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Oct 18 2022 17:03:56 GMT+0200 (CEST)
167
167
  </div>
168
168
  </div>
169
169
  <script src="../prettify.js"></script>
@@ -20,9 +20,9 @@
20
20
  </h1>
21
21
  <div class='clearfix'>
22
22
  <div class='fl pad1y space-right2'>
23
- <span class="strong">74.36% </span>
23
+ <span class="strong">97.44% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>29/39</span>
25
+ <span class='fraction'>38/39</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
28
  <span class="strong">100% </span>
@@ -30,9 +30,9 @@
30
30
  <span class='fraction'>0/0</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">37.5% </span>
33
+ <span class="strong">93.75% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>6/16</span>
35
+ <span class='fraction'>15/16</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
38
  <span class="strong">100% </span>
@@ -44,7 +44,7 @@
44
44
  Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
45
45
  </p>
46
46
  </div>
47
- <div class='status-line medium'></div>
47
+ <div class='status-line high'></div>
48
48
  <div class="pad1">
49
49
  <table class="coverage-summary">
50
50
  <thead>
@@ -75,14 +75,14 @@
75
75
  </tr>
76
76
 
77
77
  <tr>
78
- <td class="file medium" data-value="errors.spec.js"><a href="errors.spec.js.html">errors.spec.js</a></td>
79
- <td data-value="64" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 64%;"></div><div class="cover-empty" style="width:36%;"></div></div></td>
80
- <td data-value="64" class="pct medium">64%</td>
81
- <td data-value="25" class="abs medium">16/25</td>
78
+ <td class="file high" data-value="errors.spec.js"><a href="errors.spec.js.html">errors.spec.js</a></td>
79
+ <td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
80
+ <td data-value="100" class="pct high">100%</td>
81
+ <td data-value="25" class="abs high">25/25</td>
82
82
  <td data-value="100" class="pct high">100%</td>
83
83
  <td data-value="0" class="abs high">0/0</td>
84
- <td data-value="40" class="pct low">40%</td>
85
- <td data-value="15" class="abs low">6/15</td>
84
+ <td data-value="100" class="pct high">100%</td>
85
+ <td data-value="15" class="abs high">15/15</td>
86
86
  <td data-value="100" class="pct high">100%</td>
87
87
  <td data-value="16" class="abs high">16/16</td>
88
88
  </tr>
@@ -93,7 +93,7 @@
93
93
  </div><!-- /wrapper -->
94
94
  <div class='footer quiet pad2 space-top1 center small'>
95
95
  Code coverage
96
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed May 05 2021 10:40:15 GMT+0100 (BST)
96
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Oct 18 2022 17:03:56 GMT+0200 (CEST)
97
97
  </div>
98
98
  </div>
99
99
  <script src="../prettify.js"></script>
@@ -20,9 +20,9 @@
20
20
  </h1>
21
21
  <div class='clearfix'>
22
22
  <div class='fl pad1y space-right2'>
23
- <span class="strong">26.47% </span>
23
+ <span class="strong">95.59% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>18/68</span>
25
+ <span class='fraction'>65/68</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
28
  <span class="strong">100% </span>
@@ -30,21 +30,21 @@
30
30
  <span class='fraction'>0/0</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">5.26% </span>
33
+ <span class="strong">100% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>1/19</span>
35
+ <span class='fraction'>19/19</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
- <span class="strong">30% </span>
38
+ <span class="strong">95% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>18/60</span>
40
+ <span class='fraction'>57/60</span>
41
41
  </div>
42
42
  </div>
43
43
  <p class="quiet">
44
44
  Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
45
45
  </p>
46
46
  </div>
47
- <div class='status-line low'></div>
47
+ <div class='status-line high'></div>
48
48
  <pre><table class="coverage">
49
49
  <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
50
50
  <a name='L2'></a><a href='#L2'>2</a>
@@ -170,94 +170,94 @@
170
170
  <span class="cline-any cline-neutral">&nbsp;</span>
171
171
  <span class="cline-any cline-neutral">&nbsp;</span>
172
172
  <span class="cline-any cline-yes">1x</span>
173
- <span class="cline-any cline-no">&nbsp;</span>
174
- <span class="cline-any cline-no">&nbsp;</span>
175
- <span class="cline-any cline-no">&nbsp;</span>
173
+ <span class="cline-any cline-yes">1x</span>
174
+ <span class="cline-any cline-yes">1x</span>
175
+ <span class="cline-any cline-yes">5x</span>
176
176
  <span class="cline-any cline-neutral">&nbsp;</span>
177
177
  <span class="cline-any cline-neutral">&nbsp;</span>
178
178
  <span class="cline-any cline-yes">1x</span>
179
- <span class="cline-any cline-no">&nbsp;</span>
179
+ <span class="cline-any cline-yes">7x</span>
180
180
  <span class="cline-any cline-neutral">&nbsp;</span>
181
181
  <span class="cline-any cline-neutral">&nbsp;</span>
182
182
  <span class="cline-any cline-yes">1x</span>
183
- <span class="cline-any cline-no">&nbsp;</span>
183
+ <span class="cline-any cline-yes">1x</span>
184
184
  <span class="cline-any cline-neutral">&nbsp;</span>
185
185
  <span class="cline-any cline-neutral">&nbsp;</span>
186
186
  <span class="cline-any cline-yes">1x</span>
187
- <span class="cline-any cline-no">&nbsp;</span>
187
+ <span class="cline-any cline-yes">1x</span>
188
188
  <span class="cline-any cline-neutral">&nbsp;</span>
189
- <span class="cline-any cline-no">&nbsp;</span>
189
+ <span class="cline-any cline-yes">1x</span>
190
190
  <span class="cline-any cline-neutral">&nbsp;</span>
191
- <span class="cline-any cline-no">&nbsp;</span>
191
+ <span class="cline-any cline-yes">1x</span>
192
192
  <span class="cline-any cline-neutral">&nbsp;</span>
193
193
  <span class="cline-any cline-neutral">&nbsp;</span>
194
194
  <span class="cline-any cline-yes">1x</span>
195
- <span class="cline-any cline-no">&nbsp;</span>
195
+ <span class="cline-any cline-yes">1x</span>
196
196
  <span class="cline-any cline-neutral">&nbsp;</span>
197
- <span class="cline-any cline-no">&nbsp;</span>
197
+ <span class="cline-any cline-yes">1x</span>
198
198
  <span class="cline-any cline-neutral">&nbsp;</span>
199
- <span class="cline-any cline-no">&nbsp;</span>
200
- <span class="cline-any cline-no">&nbsp;</span>
199
+ <span class="cline-any cline-yes">1x</span>
200
+ <span class="cline-any cline-yes">1x</span>
201
201
  <span class="cline-any cline-neutral">&nbsp;</span>
202
202
  <span class="cline-any cline-neutral">&nbsp;</span>
203
203
  <span class="cline-any cline-yes">1x</span>
204
- <span class="cline-any cline-no">&nbsp;</span>
204
+ <span class="cline-any cline-yes">1x</span>
205
205
  <span class="cline-any cline-neutral">&nbsp;</span>
206
- <span class="cline-any cline-no">&nbsp;</span>
207
- <span class="cline-any cline-no">&nbsp;</span>
208
- <span class="cline-any cline-no">&nbsp;</span>
206
+ <span class="cline-any cline-yes">1x</span>
207
+ <span class="cline-any cline-yes">1x</span>
208
+ <span class="cline-any cline-yes">1x</span>
209
209
  <span class="cline-any cline-no">&nbsp;</span>
210
210
  <span class="cline-any cline-neutral">&nbsp;</span>
211
- <span class="cline-any cline-no">&nbsp;</span>
211
+ <span class="cline-any cline-yes">1x</span>
212
212
  <span class="cline-any cline-neutral">&nbsp;</span>
213
213
  <span class="cline-any cline-neutral">&nbsp;</span>
214
214
  <span class="cline-any cline-neutral">&nbsp;</span>
215
215
  <span class="cline-any cline-yes">1x</span>
216
- <span class="cline-any cline-no">&nbsp;</span>
216
+ <span class="cline-any cline-yes">1x</span>
217
217
  <span class="cline-any cline-neutral">&nbsp;</span>
218
- <span class="cline-any cline-no">&nbsp;</span>
219
- <span class="cline-any cline-no">&nbsp;</span>
220
- <span class="cline-any cline-no">&nbsp;</span>
218
+ <span class="cline-any cline-yes">1x</span>
219
+ <span class="cline-any cline-yes">1x</span>
220
+ <span class="cline-any cline-yes">1x</span>
221
221
  <span class="cline-any cline-no">&nbsp;</span>
222
222
  <span class="cline-any cline-neutral">&nbsp;</span>
223
- <span class="cline-any cline-no">&nbsp;</span>
223
+ <span class="cline-any cline-yes">1x</span>
224
224
  <span class="cline-any cline-neutral">&nbsp;</span>
225
225
  <span class="cline-any cline-neutral">&nbsp;</span>
226
226
  <span class="cline-any cline-neutral">&nbsp;</span>
227
227
  <span class="cline-any cline-yes">1x</span>
228
- <span class="cline-any cline-no">&nbsp;</span>
228
+ <span class="cline-any cline-yes">1x</span>
229
229
  <span class="cline-any cline-neutral">&nbsp;</span>
230
- <span class="cline-any cline-no">&nbsp;</span>
231
- <span class="cline-any cline-no">&nbsp;</span>
232
- <span class="cline-any cline-no">&nbsp;</span>
230
+ <span class="cline-any cline-yes">1x</span>
231
+ <span class="cline-any cline-yes">1x</span>
232
+ <span class="cline-any cline-yes">1x</span>
233
233
  <span class="cline-any cline-no">&nbsp;</span>
234
234
  <span class="cline-any cline-neutral">&nbsp;</span>
235
- <span class="cline-any cline-no">&nbsp;</span>
235
+ <span class="cline-any cline-yes">1x</span>
236
236
  <span class="cline-any cline-neutral">&nbsp;</span>
237
237
  <span class="cline-any cline-neutral">&nbsp;</span>
238
238
  <span class="cline-any cline-neutral">&nbsp;</span>
239
239
  <span class="cline-any cline-yes">1x</span>
240
- <span class="cline-any cline-no">&nbsp;</span>
240
+ <span class="cline-any cline-yes">1x</span>
241
241
  <span class="cline-any cline-neutral">&nbsp;</span>
242
- <span class="cline-any cline-no">&nbsp;</span>
243
- <span class="cline-any cline-no">&nbsp;</span>
242
+ <span class="cline-any cline-yes">1x</span>
243
+ <span class="cline-any cline-yes">1x</span>
244
244
  <span class="cline-any cline-neutral">&nbsp;</span>
245
- <span class="cline-any cline-no">&nbsp;</span>
245
+ <span class="cline-any cline-yes">1x</span>
246
246
  <span class="cline-any cline-neutral">&nbsp;</span>
247
- <span class="cline-any cline-no">&nbsp;</span>
248
- <span class="cline-any cline-no">&nbsp;</span>
247
+ <span class="cline-any cline-yes">1x</span>
248
+ <span class="cline-any cline-yes">1x</span>
249
249
  <span class="cline-any cline-neutral">&nbsp;</span>
250
250
  <span class="cline-any cline-neutral">&nbsp;</span>
251
251
  <span class="cline-any cline-yes">1x</span>
252
- <span class="cline-any cline-no">&nbsp;</span>
252
+ <span class="cline-any cline-yes">1x</span>
253
253
  <span class="cline-any cline-neutral">&nbsp;</span>
254
- <span class="cline-any cline-no">&nbsp;</span>
255
- <span class="cline-any cline-no">&nbsp;</span>
254
+ <span class="cline-any cline-yes">1x</span>
255
+ <span class="cline-any cline-yes">1x</span>
256
256
  <span class="cline-any cline-neutral">&nbsp;</span>
257
- <span class="cline-any cline-no">&nbsp;</span>
257
+ <span class="cline-any cline-yes">1x</span>
258
258
  <span class="cline-any cline-neutral">&nbsp;</span>
259
- <span class="cline-any cline-no">&nbsp;</span>
260
- <span class="cline-any cline-no">&nbsp;</span>
259
+ <span class="cline-any cline-yes">1x</span>
260
+ <span class="cline-any cline-yes">1x</span>
261
261
  <span class="cline-any cline-neutral">&nbsp;</span>
262
262
  <span class="cline-any cline-neutral">&nbsp;</span>
263
263
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import sinon from 'sinon';
@@ -276,95 +276,95 @@ describe('file-parser', () =&gt; {
276
276
  let mockSanitizeRows;
277
277
  let mockSetTimeout;
278
278
  &nbsp;
279
- before(<span class="fstat-no" title="function not covered" >() =</span>&gt; {
280
- <span class="cstat-no" title="statement not covered" > mockParseRow = sinon.stub(parseRow, 'default').returns(parsedRows);</span>
281
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows = sinon.stub(sanitizeRows, 'default').returns([{}]);</span>
282
- <span class="cstat-no" title="statement not covered" > mockSetTimeout = sinon.stub(global, 'setTimeout').callsFake(<span class="fstat-no" title="function not covered" >(c</span>allback) =&gt; <span class="cstat-no" title="statement not covered" >callback())</span>;</span>
279
+ before(() =&gt; {
280
+ mockParseRow = sinon.stub(parseRow, 'default').returns(parsedRows);
281
+ mockSanitizeRows = sinon.stub(sanitizeRows, 'default').returns([{}]);
282
+ mockSetTimeout = sinon.stub(global, 'setTimeout').callsFake((callback) =&gt; callback());
283
283
  });
284
284
  &nbsp;
285
- beforeEach(<span class="fstat-no" title="function not covered" >() =</span>&gt; {
286
- <span class="cstat-no" title="statement not covered" > sinon.resetHistory();</span>
285
+ beforeEach(() =&gt; {
286
+ sinon.resetHistory();
287
287
  });
288
288
  &nbsp;
289
- after(<span class="fstat-no" title="function not covered" >() =</span>&gt; {
290
- <span class="cstat-no" title="statement not covered" > sinon.restore();</span>
289
+ after(() =&gt; {
290
+ sinon.restore();
291
291
  });
292
292
  &nbsp;
293
- it('should call parseRow once per input new line', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
294
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
293
+ it('should call parseRow once per input new line', async () =&gt; {
294
+ const input = '\n';
295
295
  &nbsp;
296
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 50, dependencies);</span>
296
+ await parseFile(input, 50, dependencies);
297
297
  &nbsp;
298
- <span class="cstat-no" title="statement not covered" > expect(mockParseRow).to.be.calledTwice;</span>
298
+ expect(mockParseRow).to.be.calledTwice;
299
299
  });
300
300
  &nbsp;
301
- it('should call pass parseRow result into sanitizeRows', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
302
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
301
+ it('should call pass parseRow result into sanitizeRows', async () =&gt; {
302
+ const input = '\n';
303
303
  &nbsp;
304
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 50, dependencies);</span>
304
+ await parseFile(input, 50, dependencies);
305
305
  &nbsp;
306
- <span class="cstat-no" title="statement not covered" > expect(mockSanitizeRows).to.be.calledOnce;</span>
307
- <span class="cstat-no" title="statement not covered" > expect(mockSanitizeRows).to.be.deep.calledWith([[], []], dependencies.processRow);</span>
306
+ expect(mockSanitizeRows).to.be.calledOnce;
307
+ expect(mockSanitizeRows).to.be.deep.calledWith([[], []], dependencies.processRow);
308
308
  });
309
309
  &nbsp;
310
- it('should throw error when number of rows is more than max rows', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
311
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
310
+ it('should throw error when number of rows is more than max rows', async () =&gt; {
311
+ const input = '\n';
312
312
  &nbsp;
313
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows.returns(new Array(20));</span>
314
- <span class="cstat-no" title="statement not covered" > try {</span>
315
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 10, dependencies);</span>
313
+ mockSanitizeRows.returns(new Array(20));
314
+ try {
315
+ await parseFile(input, 10, dependencies);
316
316
  <span class="cstat-no" title="statement not covered" > expect(1).to.equal(2);</span>
317
317
  } catch (ex) {
318
- <span class="cstat-no" title="statement not covered" > expect(ex.name).to.equal('TooManyRowsError');</span>
318
+ expect(ex.name).to.equal('TooManyRowsError');
319
319
  }
320
320
  });
321
321
  &nbsp;
322
- it('should throw error when no rows returned from sanitizeRows', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
323
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
322
+ it('should throw error when no rows returned from sanitizeRows', async () =&gt; {
323
+ const input = '\n';
324
324
  &nbsp;
325
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows.returns([]);</span>
326
- <span class="cstat-no" title="statement not covered" > try {</span>
327
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 10, dependencies);</span>
325
+ mockSanitizeRows.returns([]);
326
+ try {
327
+ await parseFile(input, 10, dependencies);
328
328
  <span class="cstat-no" title="statement not covered" > expect(1).to.equal(2);</span>
329
329
  } catch (ex) {
330
- <span class="cstat-no" title="statement not covered" > expect(ex.name).to.equal('Error');</span>
330
+ expect(ex.name).to.equal('Error');
331
331
  }
332
332
  });
333
333
  &nbsp;
334
- it('should throw error an error when content is "invalidFileType"', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
335
- const input = <span class="cstat-no" title="statement not covered" >'invalidFileType';</span>
334
+ it('should throw error an error when content is "invalidFileType"', async () =&gt; {
335
+ const input = 'invalidFileType';
336
336
  &nbsp;
337
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows.returns([]);</span>
338
- <span class="cstat-no" title="statement not covered" > try {</span>
339
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 10, dependencies);</span>
337
+ mockSanitizeRows.returns([]);
338
+ try {
339
+ await parseFile(input, 10, dependencies);
340
340
  <span class="cstat-no" title="statement not covered" > expect(1).to.equal(2);</span>
341
341
  } catch (ex) {
342
- <span class="cstat-no" title="statement not covered" > expect(ex.message).to.equal('Invalid file type');</span>
342
+ expect(ex.message).to.equal('Invalid file type');
343
343
  }
344
344
  });
345
345
  &nbsp;
346
- it('should call process row once per row in single timeout', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
347
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
346
+ it('should call process row once per row in single timeout', async () =&gt; {
347
+ const input = '\n';
348
348
  &nbsp;
349
- const fakeRows = <span class="cstat-no" title="statement not covered" >(new Array(30)).fill({});</span>
350
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows.returns(fakeRows);</span>
349
+ const fakeRows = (new Array(30)).fill({});
350
+ mockSanitizeRows.returns(fakeRows);
351
351
  &nbsp;
352
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 70, dependencies);</span>
352
+ await parseFile(input, 70, dependencies);
353
353
  &nbsp;
354
- <span class="cstat-no" title="statement not covered" > expect(dependencies.processRow).to.be.callCount(30);</span>
355
- <span class="cstat-no" title="statement not covered" > expect(mockSetTimeout).to.be.calledOnce;</span>
354
+ expect(dependencies.processRow).to.be.callCount(30);
355
+ expect(mockSetTimeout).to.be.calledOnce;
356
356
  });
357
357
  &nbsp;
358
- it('should call process row once per row in two timeouts when more than 30 rows', <span class="fstat-no" title="function not covered" >async () =</span>&gt;<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > {</span></span>
359
- const input = <span class="cstat-no" title="statement not covered" >'\n';</span>
358
+ it('should call process row once per row in two timeouts when more than 30 rows', async () =&gt; {
359
+ const input = '\n';
360
360
  &nbsp;
361
- const fakeRows = <span class="cstat-no" title="statement not covered" >(new Array(50)).fill({});</span>
362
- <span class="cstat-no" title="statement not covered" > mockSanitizeRows.returns(fakeRows);</span>
361
+ const fakeRows = (new Array(50)).fill({});
362
+ mockSanitizeRows.returns(fakeRows);
363
363
  &nbsp;
364
- <span class="cstat-no" title="statement not covered" > await parseFile(input, 70, dependencies);</span>
364
+ await parseFile(input, 70, dependencies);
365
365
  &nbsp;
366
- <span class="cstat-no" title="statement not covered" > expect(dependencies.processRow).to.be.callCount(50);</span>
367
- <span class="cstat-no" title="statement not covered" > expect(mockSetTimeout).to.be.calledTwice;</span>
366
+ expect(dependencies.processRow).to.be.callCount(50);
367
+ expect(mockSetTimeout).to.be.calledTwice;
368
368
  });
369
369
  });
370
370
  &nbsp;</pre></td></tr>
@@ -373,7 +373,7 @@ describe('file-parser', () =&gt; {
373
373
  </div><!-- /wrapper -->
374
374
  <div class='footer quiet pad2 space-top1 center small'>
375
375
  Code coverage
376
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed May 05 2021 10:40:15 GMT+0100 (BST)
376
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Oct 18 2022 17:03:56 GMT+0200 (CEST)
377
377
  </div>
378
378
  </div>
379
379
  <script src="../../prettify.js"></script>