testaro 4.14.0 → 4.14.1

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 (3) hide show
  1. package/package.json +1 -1
  2. package/run.js +5 -2
  3. package/tests/ibm.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "4.14.0",
3
+ "version": "4.14.1",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/run.js CHANGED
@@ -289,9 +289,12 @@ const launch = async typeName => {
289
289
  browserContext = await browser.newContext(viewport);
290
290
  // When a page is added to the browser context:
291
291
  browserContext.on('page', page => {
292
- // Make its console messages get reported and appear in the Playwright console.
292
+ // Make abbreviations of its console messages get reported in the Playwright console.
293
293
  page.on('console', msg => {
294
- const msgText = msg.text();
294
+ let msgText = msg.text();
295
+ if (msgText.length > 300) {
296
+ msgText = `${msgText.slice(0, 150)} ... ${msgText.slice(-150)}`;
297
+ }
295
298
  console.log(`[${msgText}]`);
296
299
  const msgTextLC = msgText.toLowerCase();
297
300
  const msgLength = msgText.length;
package/tests/ibm.js CHANGED
@@ -25,7 +25,6 @@ const run = async content => {
25
25
  const nowLabel = (new Date()).toISOString().slice(0, 19);
26
26
  // Return the result of a test.
27
27
  const ibmReport = await getCompliance(content, nowLabel);
28
- await close();
29
28
  return ibmReport;
30
29
  };
31
30
  // Trims an IBM report.
@@ -118,5 +117,6 @@ exports.reporter = async (page, withItems, withNewContent) => {
118
117
  console.log('ERROR: Getting ibm test report from URL took too long');
119
118
  }
120
119
  }
120
+ await close();
121
121
  return {result};
122
122
  };