testaro 32.3.3 → 32.3.5

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 +10 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "32.3.3",
3
+ "version": "32.3.5",
4
4
  "description": "Run 900 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -426,16 +426,23 @@ const launch = async (report, typeName, url, debug, waits, isLowMotion = false)
426
426
  browserContext.setDefaultTimeout(0);
427
427
  // When a page (i.e. browser tab) is added to the browser context (i.e. browser window):
428
428
  browserContext.on('page', async page => {
429
+ // Ensure the report has a jobData property.
430
+ report.jobData ??= {};
431
+ report.jobData.logCount ??= 0;
432
+ report.jobData.logSize ??= 0;
433
+ report.jobData.errorLogCount ??= 0;
434
+ // Add any error events to the count of logging errors.
429
435
  page.on('crash', () => {
436
+ report.jobData.errorLogCount++;
430
437
  console.log('Page crashed');
431
438
  });
432
439
  page.on('pageerror', () => {
433
- console.log('Page erred');
440
+ report.jobData.errorLogCount++;
434
441
  });
435
442
  page.on('requestfailed', () => {
436
- console.log('Request failed');
443
+ report.jobData.errorLogCount++;
437
444
  });
438
- // If it emits a message:
445
+ // If the page emits a message:
439
446
  page.on('console', msg => {
440
447
  const msgText = msg.text();
441
448
  let indentedMsg = '';