Skip to content

Commit 5149e0d

Browse files
committed
fixup
1 parent bc34174 commit 5149e0d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

test/fetch/request.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ test('pre aborted signal', () => {
262262
assert.strictEqual(req.signal.reason, 'gwak')
263263
})
264264

265-
test('post aborted signal', (t) => {
266-
const { strictEqual } = tspl(t, { plan: 2 })
265+
test('post aborted signal', async (t) => {
266+
const { strictEqual, completed } = tspl(t, { plan: 2 })
267267

268268
const ac = new AbortController()
269269
const req = new Request('http://asd', { signal: ac.signal })
@@ -272,6 +272,8 @@ test('post aborted signal', (t) => {
272272
strictEqual(req.signal.reason, 'gwak')
273273
}, { once: true })
274274
ac.abort('gwak')
275+
276+
await completed
275277
})
276278

277279
test('pre aborted signal cloned', () => {
@@ -303,8 +305,8 @@ test('URLSearchParams body with Headers object - issue #1407', async () => {
303305
assert.strictEqual(await request.text(), 'abc=123')
304306
})
305307

306-
test('post aborted signal cloned', (t) => {
307-
const { strictEqual } = tspl(t, { plan: 2 })
308+
test('post aborted signal cloned', async (t) => {
309+
const { strictEqual, completed } = tspl(t, { plan: 2 })
308310

309311
const ac = new AbortController()
310312
const req = new Request('http://asd', { signal: ac.signal }).clone()
@@ -313,6 +315,8 @@ test('post aborted signal cloned', (t) => {
313315
strictEqual(req.signal.reason, 'gwak')
314316
}, { once: true })
315317
ac.abort('gwak')
318+
319+
await completed
316320
})
317321

318322
test('Passing headers in init', async (t) => {

0 commit comments

Comments
 (0)