Code coverage for link/unlink endpoints
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
const {test} = require("supertape")
|
||||
const {router} = require("../../test/web")
|
||||
const assert = require("assert").strict
|
||||
|
||||
require("./server")
|
||||
|
||||
@@ -28,5 +29,8 @@ test("web server: compresses static resources", async t => {
|
||||
"accept-encoding": "gzip"
|
||||
}
|
||||
})
|
||||
t.ok(content instanceof ReadableStream)
|
||||
assert(content instanceof ReadableStream)
|
||||
const firstChunk = await content.getReader().read()
|
||||
t.ok(firstChunk.value instanceof Uint8Array, "can get data")
|
||||
t.deepEqual(firstChunk.value.slice(0, 3), Uint8Array.from([31, 139, 8]), "has compressed gzip header")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user