Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 committed May 13, 2024
1 parent e60add7 commit 3a68023
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/interceptors/dump-interceptor.js
Expand Up @@ -77,7 +77,7 @@ test('Should dump on abort', async t => {
})

test('Should dump on already aborted request', async t => {
t = tspl(t, { plan: 2 })
t = tspl(t, { plan: 3 })
let offset = 0
const server = createServer((req, res) => {
const max = 1024
Expand Down Expand Up @@ -129,8 +129,10 @@ test('Should dump on already aborted request', async t => {
})

abc.abort()
const response = await client.request(requestOptions)
t.equal(response.statusCode, undefined)
client.request(requestOptions).catch(err => {
t.equal(err.name, 'AbortError')
t.equal(err.message, 'This operation was aborted')
})

await t.completed
})
Expand Down

0 comments on commit 3a68023

Please sign in to comment.