testilo 41.5.4 → 41.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testilo",
3
- "version": "41.5.4",
3
+ "version": "41.5.5",
4
4
  "description": "Prepares Testaro jobs and processes Testaro reports",
5
5
  "main": "call.js",
6
6
  "scripts": {
@@ -284,12 +284,10 @@ exports.issues = {
284
284
  quality: 0.5,
285
285
  what: 'Script removes the focus when focus is received [invalid]'
286
286
  },
287
- qualWeb: {
288
- 'QW-WCAG-T32': {
289
- variable: false,
290
- quality: 1,
291
- what: 'ol, ul or dl may fail to be used for a list or group of links [speculative]'
292
- }
287
+ 'QW-WCAG-T32': {
288
+ variable: false,
289
+ quality: 1,
290
+ what: 'ol, ul or dl may fail to be used for a list or group of links [speculative]'
293
291
  }
294
292
  }
295
293
  }
@@ -50,8 +50,6 @@ const issueCountWeight = 10;
50
50
  */
51
51
  const maxWeight = 30;
52
52
 
53
- // 2. Solo
54
-
55
53
  // 3. Tool
56
54
  /*
57
55
  Severity: amount added to each raw tool score by each violation of a rule with ordinal severity 0
@@ -90,7 +88,7 @@ const latencyWeight = 2;
90
88
 
91
89
  // RULE CONSTANTS
92
90
 
93
- // Initialize a table of tool rules.
91
+ // Initialize a table of issue-classified tool rules.
94
92
  const issueIndex = {};
95
93
  // Initialize an array of variably named tool rules.
96
94
  const issueMatcher = [];
@@ -100,10 +98,8 @@ Object.keys(issues).forEach(issueName => {
100
98
  Object.keys(issues[issueName].tools).forEach(toolName => {
101
99
  // For each of those rules:
102
100
  Object.keys(issues[issueName].tools[toolName]).forEach(ruleID => {
101
+ issueIndex[toolName] ??= {};
103
102
  // Add it to the table of tool rules.
104
- if (! issueIndex[toolName]) {
105
- issueIndex[toolName] = {};
106
- }
107
103
  issueIndex[toolName][ruleID] = issueName;
108
104
  // If it is variably named:
109
105
  if (issues[issueName].tools[toolName][ruleID].variable) {
@@ -197,8 +193,8 @@ exports.scorer = report => {
197
193
  standardResult.instances.forEach(instance => {
198
194
  const {ordinalSeverity, pathID, ruleID, what} = instance;
199
195
  const count = instance.count || 1;
200
- // If the rule ID is not in the table of tool rules:
201
196
  let canonicalRuleID = ruleID;
197
+ // If the rule ID is not in the table of issue-classified tool rules:
202
198
  if (! issueIndex[which][ruleID]) {
203
199
  // Convert it to the variably named tool rule that it matches, if any.
204
200
  canonicalRuleID = issueMatcher.find(pattern => {