From 5149e0dda4c5889fc884f1a0199f2aaa78d8f8a4 Mon Sep 17 00:00:00 2001 From: tsctx <91457664+tsctx@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:24:31 +0000 Subject: [PATCH] fixup --- test/fetch/request.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/fetch/request.js b/test/fetch/request.js index 1f4061b2ebe..af6a36f2d24 100644 --- a/test/fetch/request.js +++ b/test/fetch/request.js @@ -262,8 +262,8 @@ test('pre aborted signal', () => { assert.strictEqual(req.signal.reason, 'gwak') }) -test('post aborted signal', (t) => { - const { strictEqual } = tspl(t, { plan: 2 }) +test('post aborted signal', async (t) => { + const { strictEqual, completed } = tspl(t, { plan: 2 }) const ac = new AbortController() const req = new Request('http://asd', { signal: ac.signal }) @@ -272,6 +272,8 @@ test('post aborted signal', (t) => { strictEqual(req.signal.reason, 'gwak') }, { once: true }) ac.abort('gwak') + + await completed }) test('pre aborted signal cloned', () => { @@ -303,8 +305,8 @@ test('URLSearchParams body with Headers object - issue #1407', async () => { assert.strictEqual(await request.text(), 'abc=123') }) -test('post aborted signal cloned', (t) => { - const { strictEqual } = tspl(t, { plan: 2 }) +test('post aborted signal cloned', async (t) => { + const { strictEqual, completed } = tspl(t, { plan: 2 }) const ac = new AbortController() const req = new Request('http://asd', { signal: ac.signal }).clone() @@ -313,6 +315,8 @@ test('post aborted signal cloned', (t) => { strictEqual(req.signal.reason, 'gwak') }, { once: true }) ac.abort('gwak') + + await completed }) test('Passing headers in init', async (t) => {