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