testaro 2.3.5 → 2.3.8
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/index.js +4 -4
- package/package.json +1 -1
- package/procs/score/asp09.js +4 -4
package/index.js
CHANGED
|
@@ -1105,16 +1105,16 @@ const doScript = async (options, report) => {
|
|
|
1105
1105
|
const scoreTable = scoreTables[0];
|
|
1106
1106
|
const {result} = scoreTable;
|
|
1107
1107
|
if (result) {
|
|
1108
|
-
const {logWeights,
|
|
1109
|
-
if (logWeights &&
|
|
1110
|
-
|
|
1108
|
+
const {logWeights, scores} = result;
|
|
1109
|
+
if (logWeights && scores) {
|
|
1110
|
+
scores.log = Math.floor(
|
|
1111
1111
|
logWeights.count * logCount
|
|
1112
1112
|
+ logWeights.size * logSize
|
|
1113
1113
|
+ logWeights.prohibited * prohibitedCount
|
|
1114
1114
|
+ logWeights.visitTimeout * visitTimeoutCount
|
|
1115
1115
|
+ logWeights.visitRejection * visitRejectionCount
|
|
1116
1116
|
);
|
|
1117
|
-
|
|
1117
|
+
scores.total += scores.log;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
package/package.json
CHANGED
package/procs/score/asp09.js
CHANGED
|
@@ -287,20 +287,20 @@ exports.scorer = acts => {
|
|
|
287
287
|
contrast: 3,
|
|
288
288
|
alert: 2
|
|
289
289
|
};
|
|
290
|
-
const
|
|
290
|
+
const waveScores = {
|
|
291
291
|
error: 0,
|
|
292
292
|
contrast: 0,
|
|
293
293
|
alert: 0
|
|
294
294
|
};
|
|
295
295
|
['error', 'contrast', 'alert'].forEach(level => {
|
|
296
296
|
const {items} = facts[level];
|
|
297
|
-
|
|
297
|
+
waveScores[level] = Math.round(Object.keys(items).reduce((total, ruleID) => {
|
|
298
298
|
const rawScore = items[ruleID].count * weights[level];
|
|
299
299
|
const divisor = duplications.wave[`${level.slice(0, 1)}:${ruleID}`] + 1 || 1;
|
|
300
300
|
return total + rawScore / divisor;
|
|
301
301
|
}, 0));
|
|
302
302
|
});
|
|
303
|
-
scores.wave =
|
|
303
|
+
scores.wave = waveScores.error + waveScores.contrast + waveScores.alert;
|
|
304
304
|
scores.total += scores.wave;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -538,7 +538,7 @@ exports.scorer = acts => {
|
|
|
538
538
|
}
|
|
539
539
|
});
|
|
540
540
|
};
|
|
541
|
-
estimate(['aatt', 'axe', 'ibm', 'wave'], 100);
|
|
541
|
+
estimate(['alfa', 'aatt', 'axe', 'ibm', 'wave'], 100);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
// Return the score facts, except for the log test.
|