From 0a36b826688843af129e7ead31bf4cd0f1777333 Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" Date: Fri, 20 Sep 2024 11:02:22 -0700 Subject: [PATCH] Fix custom test for ReadableStreamDefaultController (#1834) --- custom/tests.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/custom/tests.yaml b/custom/tests.yaml index 268dd3af..c24494c6 100644 --- a/custom/tests.yaml +++ b/custom/tests.yaml @@ -4149,11 +4149,18 @@ api: } var instance; - var stream = new ReadableStream({ - start(controller) { - instance = controller; + try { + var stream = new ReadableStream({ + start(controller) { + instance = controller; + } + }); + } catch(e) { + if (e instanceof TypeError) { + return {result: false, message: e.message}; } - }); + return e; + } ReadableStreamDefaultReader: __base: |- <%api.ReadableStream:streamPromise%>