http_compression icon indicating copy to clipboard operation
http_compression copied to clipboard

Accept-Encoding: "*" doesn't work in tests

Open talentlessguy opened this issue 2 years ago • 0 comments

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

talentlessguy avatar Jan 30 '23 10:01 talentlessguy