mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
Merge pull request #3144 from tertsdiepraam/docs-test-coverage
docs: fix url for full test report
This commit is contained in:
commit
8d0ba50f26
1 changed files with 11 additions and 6 deletions
|
@ -7,13 +7,18 @@ function progressBar(totals) {
|
||||||
totalTests += value;
|
totalTests += value;
|
||||||
}
|
}
|
||||||
const passPercentage = Math.round(100 * totals["PASS"] / totalTests);
|
const passPercentage = Math.round(100 * totals["PASS"] / totalTests);
|
||||||
const skipPercentage = passPercentage + Math.round(100 * totals["PASS"] / totalTests);
|
const skipPercentage = passPercentage + Math.round(100 * totals["SKIP"] / totalTests);
|
||||||
|
|
||||||
|
// The ternary expressions are used for some edge-cases where there are no failing test,
|
||||||
|
// but still a red (or beige) line shows up because of how CSS draws gradients.
|
||||||
bar.style = `background: linear-gradient(
|
bar.style = `background: linear-gradient(
|
||||||
to right,
|
to right,
|
||||||
var(--PASS) ${passPercentage}%,
|
var(--PASS) ${passPercentage}%`
|
||||||
var(--SKIP) ${passPercentage}%,
|
+ ( passPercentage === 100 ? ", var(--PASS)" :
|
||||||
var(--SKIP) ${skipPercentage}%,
|
`, var(--SKIP) ${passPercentage}%,
|
||||||
var(--FAIL) 0)`;
|
var(--SKIP) ${skipPercentage}%`
|
||||||
|
)
|
||||||
|
+ (skipPercentage === 100 ? ")" : ", var(--FAIL) 0)");
|
||||||
|
|
||||||
const progress = document.createElement("div");
|
const progress = document.createElement("div");
|
||||||
progress.className = "progress"
|
progress.className = "progress"
|
||||||
|
@ -69,7 +74,7 @@ function parse_result(parent, obj) {
|
||||||
return totals;
|
return totals;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch("https://github.com/uutils/coreutils-tracking/blob/main/gnu-full-result.json")
|
fetch("https://raw.githubusercontent.com/uutils/coreutils-tracking/main/gnu-full-result.json")
|
||||||
.then((r) => r.json())
|
.then((r) => r.json())
|
||||||
.then((obj) => {
|
.then((obj) => {
|
||||||
let parent = document.getElementById("test-cov");
|
let parent = document.getElementById("test-cov");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue