testaro 4.2.6 → 4.3.0

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/batchify.js CHANGED
@@ -16,6 +16,7 @@ exports.batchify = (script, batch, timeStamp) => {
16
16
  });
17
17
  const spec = {
18
18
  id: `${timeStamp}-${host.id}`,
19
+ host,
19
20
  script: newScript
20
21
  };
21
22
  return spec;
package/create.js CHANGED
@@ -21,9 +21,10 @@ const reportDir = process.env.REPORTDIR;
21
21
  // ########## FUNCTIONS
22
22
 
23
23
  // Runs one script and writes a report file.
24
- const runHost = async (id, script) => {
24
+ const runHost = async (id, script, host = {}) => {
25
25
  const report = {
26
26
  id,
27
+ host,
27
28
  log: [],
28
29
  script,
29
30
  acts: []
@@ -43,16 +44,16 @@ exports.runJob = async (scriptID, batchID) => {
43
44
  // If there is a batch:
44
45
  let batch = null;
45
46
  if (batchID) {
46
- // Convert the script to a batch-based set of scripts.
47
+ // Convert the script to a batch-based set of host scripts.
47
48
  const batchJSON = await fs.readFile(`${batchDir}/${batchID}.json`, 'utf8');
48
49
  batch = JSON.parse(batchJSON);
49
50
  const specs = batchify(script, batch, timeStamp);
50
- // For each script:
51
+ // For each host script:
51
52
  while (specs.length) {
52
53
  const spec = specs.shift();
53
- const {id, script} = spec;
54
+ const {id, host, script} = spec;
54
55
  // Run it and save the result with a host-suffixed ID.
55
- await runHost(id, script);
56
+ await runHost(id, script, host);
56
57
  }
57
58
  }
58
59
  // Otherwise, i.e. if there is no batch:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "4.2.6",
3
+ "version": "4.3.0",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {