testaro 10.6.2 → 10.6.4

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 (3) hide show
  1. package/package.json +1 -1
  2. package/tests/ibm.js +10 -3
  3. package/watch.js +1 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "10.6.2",
3
+ "version": "10.6.4",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/ibm.js CHANGED
@@ -94,8 +94,15 @@ const trimReport = (report, withItems, rules) => {
94
94
  // Performs an IBM test and returns the result.
95
95
  const doTest = async (content, withItems, timeLimit, rules) => {
96
96
  // Conduct the test and get the result.
97
- const report = await run(content, timeLimit);
98
- // If the test did not time out:
97
+ let report;
98
+ try {
99
+ report = await run(content, timeLimit);
100
+ }
101
+ catch(error) {
102
+ console.log(`ibm test failed ${error.message.slice(0, 100)}...`);
103
+ report = null;
104
+ }
105
+ // If the test did not crash or time out:
99
106
  if (report) {
100
107
  // Delete any report files.
101
108
  try {
@@ -114,7 +121,7 @@ const doTest = async (content, withItems, timeLimit, rules) => {
114
121
  else {
115
122
  return {
116
123
  prevented: true,
117
- error: 'ERROR: getting ibm test report took too long'
124
+ error: 'ERROR: ibm test failed or timed out'
118
125
  };
119
126
  }
120
127
  };
package/watch.js CHANGED
@@ -192,9 +192,7 @@ const runJob = async (job, isDirWatch) => {
192
192
  else {
193
193
  // Send the report to the server.
194
194
  const ack = await writeNetReport(job);
195
- if (ack.error) {
196
- console.log(JSON.stringify(ack, null, 2));
197
- }
195
+ console.log(JSON.stringify(ack, null, 2));
198
196
  }
199
197
  }
200
198
  // If the job failed: