http_compression
http_compression copied to clipboard
Accept-Encoding: "*" doesn't work in tests
it.only('accepts a single compression algorithm', async () => {
const request = superdeno(compression({ path: 'LICENSE', compression: ['br'] }))
await request.get('/').set('Accept-Encoding', '*').expect('Content-Encoding', 'br')
})
this test fails because it cannot find Content-Encoding header for some reason:
error: Error: expected "Content-Encoding" header field
return new Error(`expected "${field}" header field`);
I'm not sure if this is a superdeno bug or the lib bug, because if you run example with * it works as intended