Skip to content

Commit

Permalink
fix: correct test with bug fix in undici
Browse files Browse the repository at this point in the history
HTTP status codes in requests that are not retried are correctly passed
through with fix in undici nodejs/undici#2496
  • Loading branch information
MzUgM committed Dec 5, 2023
1 parent 255ac92 commit 20c7b25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"license": "MIT",
"dependencies": {
"fast-jwt": "^3.3.2",
"undici": "^5.28.2"
"undici": "^6.0.0"
},
"devDependencies": {
"fastify": "^4.24.3",
Expand Down
3 changes: 2 additions & 1 deletion tests/interceptor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ test('only retries on provided status codes', async (t) => {
}
})

await assert.rejects(request(`http://localhost:${mainServer.address().port}`, { dispatcher }))
const response = await request(`http://localhost:${mainServer.address().port}`, { dispatcher })
assert.strictEqual(response.statusCode, 403)
})

test('error handling on creation', async (t) => {
Expand Down

0 comments on commit 20c7b25

Please sign in to comment.