testaro 59.2.10 → 59.2.11

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 (2) hide show
  1. package/package.json +1 -1
  2. package/tests/testaro.js +14 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "59.2.10",
3
+ "version": "59.2.11",
4
4
  "description": "Run 1000 web accessibility tests from 11 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tests/testaro.js CHANGED
@@ -304,6 +304,7 @@ exports.reporter = async (page, report, actIndex) => {
304
304
  const endTime = Date.now();
305
305
  testTimes.push([rule, Math.round((endTime - startTime) / 1000)]);
306
306
  data.rulePreventions.push(rule);
307
+ data.rulePreventionMessages[rule] = 'Timeout';
307
308
  result[rule].totals = [0, 0, 0, 0];
308
309
  result[rule].standardInstances = [];
309
310
  console.log(`ERROR: Test of testaro rule ${rule} timed out`);
@@ -333,6 +334,11 @@ exports.reporter = async (page, report, actIndex) => {
333
334
  break;
334
335
  }
335
336
  }
337
+ // Otherwise, i.e. if the test timed out:
338
+ else {
339
+ // Stop retrying the test.
340
+ break;
341
+ }
336
342
  }
337
343
  // If an error is thrown by the test:
338
344
  catch(error) {
@@ -377,16 +383,14 @@ exports.reporter = async (page, report, actIndex) => {
377
383
  break;
378
384
  }
379
385
  }
380
- finally {
381
- // Clear the timeout and the error listeners.
382
- clearTimeout(timeout);
383
- if (page && ! page.isClosed() && crashHandler) {
384
- page.off('crash', crashHandler);
385
- }
386
- if (browser && disconnectHandler) {
387
- browser.off('disconnected', disconnectHandler);
388
- }
389
- }
386
+ }
387
+ // Clear the timeout and the error listeners.
388
+ clearTimeout(timeout);
389
+ if (page && ! page.isClosed() && crashHandler) {
390
+ page.off('crash', crashHandler);
391
+ }
392
+ if (browser && disconnectHandler) {
393
+ browser.off('disconnected', disconnectHandler);
390
394
  }
391
395
  }
392
396
  // Otherwise, i.e. if the rule is undefined or doubly defined: