Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Mar 29, 2024
1 parent 9d2685b commit 6091169
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/issue-288.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { test } = require('tap')
const Fastify = require('fastify')
const fastifyCompress = require('..')
const { fetch, setGlobalDispatcher, Agent } = require('undici')
const { request, setGlobalDispatcher, Agent } = require('undici')

setGlobalDispatcher(new Agent({
keepAliveTimeout: 10,
Expand Down Expand Up @@ -39,9 +39,10 @@ test('should not corrupt the file content', async (t) => {

const { port } = fastify.server.address()
const url = `http://localhost:${port}`
const response = await fetch(`${url}/issue`)
const response2 = await fetch(`${url}/good`)
const body = await response.text()
const body2 = await response2.text()

const response = await request(`${url}/issue`)
const response2 = await request(`${url}/good`)
const body = await response.body.text()
const body2 = await response2.body.text()
t.equal(body, body2)
})

0 comments on commit 6091169

Please sign in to comment.