testaro 28.2.3 → 28.2.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 (2) hide show
  1. package/package.json +1 -1
  2. package/run.js +8 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "28.2.3",
3
+ "version": "28.2.4",
4
4
  "description": "Run 960 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -13,9 +13,6 @@ const {actSpecs} = require('./actSpecs');
13
13
  const {browserClose, getNonce, goTo, launch} = require('./procs/nav');
14
14
  // Module to standardize report formats.
15
15
  const {standardize} = require('./procs/standardize');
16
- // HTTP and HTTPS clients.
17
- const http = require('http');
18
- const https = require('https');
19
16
 
20
17
  // ########## CONSTANTS
21
18
 
@@ -118,7 +115,7 @@ const hasSubtype = (variable, subtype) => {
118
115
  return tests[variable];
119
116
  }
120
117
  else if (subtype === 'isWaitable') {
121
- return waitables.includes(variable);
118
+ return ['url', 'title', 'body'].includes(variable);
122
119
  }
123
120
  else if (subtype === 'areNumbers') {
124
121
  return areNumbers(variable);
@@ -483,7 +480,7 @@ const doActs = async (report, actIndex, page) => {
483
480
  // If the notification threw an error:
484
481
  request.on('error', error => {
485
482
  // Report the error.
486
- const errorMessage = `ERROR notifying the server of an act`;
483
+ const errorMessage = 'ERROR notifying the server of an act';
487
484
  console.log(`${errorMessage} (${error.message})`);
488
485
  });
489
486
  request.end();
@@ -582,12 +579,12 @@ const doActs = async (report, actIndex, page) => {
582
579
  addError(act, 'badRedirection', 'ERROR: Navigation illicitly redirected');
583
580
  await abortActs();
584
581
  }
585
- }
586
- // If the visit failed:
587
- if (response.error) {
588
- // Report this and quit.
589
- addError(act, 'failure', 'ERROR: Visits failed');
590
- await abortActs();
582
+ // Otherwise, i.e. if the visit failed:
583
+ else {
584
+ // Report this and quit.
585
+ addError(act, 'failure', 'ERROR: Visit failed');
586
+ await abortActs();
587
+ }
591
588
  }
592
589
  }
593
590
  // Otherwise, if the act is a wait for text: