From 65c5a0a68dbbb9e516021deb52ad2ffefd285eaa Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Sat, 13 Jul 2024 02:16:54 +0000 Subject: [PATCH] test(async-flow): add test of host rejection --- packages/async-flow/test/async-flow.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/async-flow/test/async-flow.test.js b/packages/async-flow/test/async-flow.test.js index fa81231ae28..ed281cc9bf5 100644 --- a/packages/async-flow/test/async-flow.test.js +++ b/packages/async-flow/test/async-flow.test.js @@ -242,7 +242,7 @@ const testGoodReplay = async (t, zone) => { // same question. different answer t.is(prod2, 42); t.log('about to await p3'); - await p3; + t.is(await p3.catch(r => r), 'done'); t.log('p3 settled'); }, }; @@ -294,7 +294,7 @@ const testGoodReplay = async (t, zone) => { ]); // @ts-expect-error TS doesn't know it is a resolver - r3.resolve('done'); + r3.reject('done'); await eventLoopIteration(); t.is(await when(outcomeV), undefined);