testaro 10.6.0 → 10.6.3

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/watch.js +7 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "10.6.0",
3
+ "version": "10.6.3",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/watch.js CHANGED
@@ -38,7 +38,7 @@ const checkDirJob = async watchee => {
38
38
  }
39
39
  catch(error) {
40
40
  return {
41
- error: 'ERROR: Job was not JSON',
41
+ error: `ERROR parsing job as JSON (${error.message})`,
42
42
  message: error.message
43
43
  };
44
44
  }
@@ -48,7 +48,8 @@ const checkDirJob = async watchee => {
48
48
  return {};
49
49
  }
50
50
  }
51
- catch {
51
+ catch(error) {
52
+ console.log(`Directory watching failed (${error.message})`);
52
53
  return {};
53
54
  }
54
55
  };
@@ -87,6 +88,9 @@ const checkNetJob = async watchee => {
87
88
  if (job.id) {
88
89
  console.log(`Network job ${job.id} received`);
89
90
  }
91
+ else {
92
+ console.log('No network job available');
93
+ }
90
94
  return job;
91
95
  };
92
96
  // Writes a directory report.
@@ -188,9 +192,7 @@ const runJob = async (job, isDirWatch) => {
188
192
  else {
189
193
  // Send the report to the server.
190
194
  const ack = await writeNetReport(job);
191
- if (ack.error) {
192
- console.log(JSON.stringify(ack, null, 2));
193
- }
195
+ console.log(JSON.stringify(ack, null, 2));
194
196
  }
195
197
  }
196
198
  // If the job failed:
@@ -243,7 +245,6 @@ exports.cycle = async (isDirWatch, isForever, interval, watchee = null) => {
243
245
  }
244
246
  // Otherwise, i.e. if no job was found:
245
247
  else {
246
- console.log('No job to do');
247
248
  // Cause a wait before the next check.
248
249
  empty = true;
249
250
  }