testaro 2.3.0 → 2.3.1

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.
package/aceconfig.js CHANGED
@@ -3,5 +3,4 @@ module.exports = {
3
3
  'violation',
4
4
  'recommendation'
5
5
  ],
6
- outputFolder: 'temp/ibm'
7
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/ibm.js CHANGED
@@ -14,8 +14,7 @@
14
14
  reportLevels: [
15
15
  'violation',
16
16
  'recommendation'
17
- ],
18
- outputFolder: 'temp/ibm'
17
+ ]
19
18
  };
20
19
  */
21
20
  // Import required modules.
@@ -26,17 +25,6 @@ const run = async content => {
26
25
  const nowLabel = (new Date()).toISOString().slice(0, 19);
27
26
  // Return the result of a test.
28
27
  const report = await getCompliance(content, nowLabel);
29
- /*
30
- let timeoutID;
31
- const deadline = new Promise(resolve => {
32
- timeoutID = setTimeout(() => {
33
- resolve('');
34
- }, 20000);
35
- });
36
- const result = Promise.race([report, deadline]);
37
- clearTimeout(timeoutID);
38
- return result;
39
- */
40
28
  return report;
41
29
  };
42
30
  // Reports the result of an IBM test.
@@ -80,10 +68,10 @@ exports.reporter = async (page, withItems, withNewContent) => {
80
68
  all.url = report(result, withItems);
81
69
  }
82
70
  // Delete the report files.
83
- fs.rm('temp/ibm', {recursive: true})
84
- .catch(error => {
85
- console.log(`ERROR deleting temporary ibm files (${error.message})`);
86
- });
71
+ const reportNames = await fs.readdir('results');
72
+ for (const reportName of reportNames) {
73
+ await fs.rm(`results/${reportName}`);
74
+ }
87
75
  // Return the result.
88
76
  return {result: all};
89
77
  };