testaro 2.0.3 → 2.0.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/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1072,6 +1072,9 @@ const doActs = async (report, actIndex, page) => {
1072
1072
  const doScript = async (options, report) => {
1073
1073
  // Reinitialize the log statistics.
1074
1074
  logCount = logSize = prohibitedCount = visitTimeoutCount = visitRejectionCount= 0;
1075
+ // Add the start time to the report.
1076
+ const startTime = new Date();
1077
+ report.startTime = startTime.toISOString().slice(0, 19);
1075
1078
  // Add initialized properties to the report.
1076
1079
  report.presses = 0;
1077
1080
  report.amountRead = 0;
@@ -1105,6 +1108,10 @@ const doScript = async (options, report) => {
1105
1108
  }
1106
1109
  }
1107
1110
  }
1111
+ // Add the end time and duration to the report.
1112
+ const endTime = new Date();
1113
+ report.endTime = endTime.toISOString().slice(0, 19);
1114
+ report.elapsedSeconds = Math.floor((endTime - startTime) / 1000);
1108
1115
  // Add the report to the reports array.
1109
1116
  options.reports.push(report);
1110
1117
  };
@@ -1191,7 +1198,7 @@ exports.handleRequest = async options => {
1191
1198
  },
1192
1199
  {
1193
1200
  event: 'timeStamp',
1194
- value: Math.floor((Date.now() - Date.UTC(2022, 3)) / 10000).toString(36)
1201
+ value: Math.floor((Date.now() - Date.UTC(2022, 1)) / 10000).toString(36)
1195
1202
  }
1196
1203
  );
1197
1204
  // Add the batch size to the log if there is a batch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {