Improve test coverage

This commit is contained in:
Cadence Ember 2024-02-02 15:55:02 +13:00
parent 69922c4a14
commit c7fb6fd52e
10 changed files with 374 additions and 33 deletions

View file

@ -39,6 +39,7 @@ async function runSingleTest(t, url, totalSize) {
res.body.emit("end")
})
t.equal(result.subarray(1, 4).toString("ascii"), "PNG", `result was not a PNG file: ${result.toString("base64")}`)
/* c8 ignore next 5 */
if (meter.bytes < totalSize / 4) { // should download less than 25% of each file
t.pass("intentionally read partial file")
} else {