Skip to content

Commit

Permalink
Upgrade unidici to v6.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyxu2005 committed Mar 30, 2024
1 parent c1882b9 commit 6cee3e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"tap": "^16.3.7",
"tsd": "^0.30.0",
"typescript": "^5.1.6",
"undici": "^5.28.3"
"undici": "^6.10.2"
},
"scripts": {
"coverage": "npm run test:unit -- --coverage-report=html",
Expand Down
10 changes: 5 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 @@ -37,10 +37,10 @@ test('should not corrupt the file content', async (t) => {

const address = await fastify.listen({ port: 0, host: '127.0.0.1' })

const response1 = await fetch(`${address}/compress`)
const response2 = await fetch(`${address}/no-compress`)
const body1 = await response1.text()
const body2 = await response2.text()
const response1 = await request(`${address}/compress`)
const response2 = await request(`${address}/no-compress`)
const body1 = await response1.body.text()
const body2 = await response2.body.text()
t.equal(body1, body2)
t.equal(body1.length, twoByteUnicodeContent.length)
t.equal(body2.length, twoByteUnicodeContent.length)
Expand Down

0 comments on commit 6cee3e8

Please sign in to comment.