fix: correct score calculation in accessibility test
This commit is contained in:
@@ -51,7 +51,7 @@ async function runAxeTest(url, pageName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calculateScore(violations, passes, incomplete) {
|
function calculateScore(violations, passes, incomplete) {
|
||||||
const total = violations.length + passes.length + incomplete.length;
|
const total = violations.length + passes + incomplete;
|
||||||
if (total === 0) return 100;
|
if (total === 0) return 100;
|
||||||
return ((passes / total) * 100).toFixed(1);
|
return ((passes / total) * 100).toFixed(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user