Closed talentlessguy closed 3 years ago
sicck thanks for updating it, @asos-craigmorten !
Released in https://deno.land/x/superdeno@4.5.0 - please reopen if have any issues!
@cmorten it seems to erase some headers?
import { superdeno } from 'https://deno.land/x/superdeno@4.5.0/mod.ts'
import { describe, it, run } from 'https://deno.land/x/tincan@0.2.2/mod.ts'
import { compression } from 'https://deno.land/x/compression/mod.ts'
describe('options', () => {
it('applies compression to a file', async () => {
const request = superdeno(compression({ path: 'README.md', compression: ['gzip'] }))
await request
.get('/')
.set('Accept-Encoding', 'gzip')
.expect('Content-Length', '694')
.expect('Content-Encoding', 'gzip')
})
})
run()
yields
Error: expected "Content-Length" header field
at Test.#assertHeader (https://deno.land/x/superdeno@4.5.0/src/test.ts:582:14)
at Test.#assertFunction (https://deno.land/x/superdeno@4.5.0/src/test.ts:637:13)
at Test.#assert (https://deno.land/x/superdeno@4.5.0/src/test.ts:500:35)
at https://deno.land/x/superdeno@4.5.0/src/test.ts:475:23
at async close (https://deno.land/x/superdeno@4.5.0/src/close.ts:47:46)
failures:
options > applies compression to a file
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out (509ms)
Issue
Setup:
Details
With new
std/http
superdeno doesn't work anymore. superdeno should support new API and deprecate the old one