testaro 18.13.1 → 18.13.2

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/standardize.js +24 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "18.13.1",
3
+ "version": "18.13.2",
4
4
  "description": "Run 920 web accessibility tests from 9 tools and get a standardized report",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/standardize.js CHANGED
@@ -320,29 +320,31 @@ const convert = (toolName, result, standardResult) => {
320
320
  // ibm
321
321
  else if (toolName === 'ibm' && result.totals) {
322
322
  standardResult.totals = [0, result.totals.recommendation, 0, result.totals.violation];
323
- result.items.forEach(item => {
324
- const identifiers = getIdentifiers(item.snippet);
325
- if (! identifiers[0] && item.path && item.path.dom) {
326
- const tagNameArray = item.path.dom.match(/^.+\/([^/[]+)/s);
327
- if (tagNameArray && tagNameArray.length === 2) {
328
- identifiers[0] = tagNameArray[1].toUpperCase();
323
+ if (result.items) {
324
+ result.items.forEach(item => {
325
+ const identifiers = getIdentifiers(item.snippet);
326
+ if (! identifiers[0] && item.path && item.path.dom) {
327
+ const tagNameArray = item.path.dom.match(/^.+\/([^/[]+)/s);
328
+ if (tagNameArray && tagNameArray.length === 2) {
329
+ identifiers[0] = tagNameArray[1].toUpperCase();
330
+ }
329
331
  }
330
- }
331
- const instance = {
332
- ruleID: item.ruleId,
333
- what: item.message,
334
- ordinalSeverity: ['', 'recommendation', '', 'violation'].indexOf(item.level),
335
- tagName: identifiers[0],
336
- id: identifiers[1],
337
- location: {
338
- doc: 'dom',
339
- type: 'xpath',
340
- spec: item.path.dom
341
- },
342
- excerpt: cap(item.snippet)
343
- };
344
- standardResult.instances.push(instance);
345
- });
332
+ const instance = {
333
+ ruleID: item.ruleId,
334
+ what: item.message,
335
+ ordinalSeverity: ['', 'recommendation', '', 'violation'].indexOf(item.level),
336
+ tagName: identifiers[0],
337
+ id: identifiers[1],
338
+ location: {
339
+ doc: 'dom',
340
+ type: 'xpath',
341
+ spec: item.path.dom
342
+ },
343
+ excerpt: cap(item.snippet)
344
+ };
345
+ standardResult.instances.push(instance);
346
+ });
347
+ }
346
348
  }
347
349
  // nuVal
348
350
  else if (toolName === 'nuVal' && (result.pageContent || result.rawPage)) {