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.
- package/package.json +1 -1
- package/tests/testaro.js +14 -10
package/package.json
CHANGED
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
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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:
|