Skip to content

Commit 2c75124

Browse files
committed
🔊 clean up test output
1 parent f56da03 commit 2c75124

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎security/test/test.mjs‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,18 @@ function test(version, patched) {
6969

7070
for (const cve of cveMap) {
7171
if(cve[1].versions.includes(version)) {
72-
const status = d.querySelector(`#CVE-${cve[0]} .cve__footer-status`).textContent;
73-
console.log(status);
72+
const cveName = `CVE-${cve[0]}`
73+
const status = d.querySelector(`#${cveName} .cve__footer-status`).textContent;
74+
75+
if(status.startsWith(`Can't`)) {
76+
console.log(`${cveName.padEnd(14)} - ${status}`);
77+
}
78+
else {
79+
console.log(status
80+
.replace('CVE', `${cveName.padEnd(14)} - `)
81+
);
82+
}
83+
7484
}
7585
}
7686

0 commit comments

Comments
 (0)