From 45b3aa22c0adbea5fbfbd572eac172a60b79a5e9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 16 Mar 2022 09:30:43 -0400 Subject: feat(ext/fetch): Allow Response status 101 (#13969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- cli/tests/unit/fetch_test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/tests/unit/fetch_test.ts') diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index 3b2d765a5..bfd5bc991 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -970,7 +970,7 @@ Deno.test(function fetchResponseConstructorNullBody() { }); Deno.test(function fetchResponseConstructorInvalidStatus() { - const invalidStatus = [101, 600, 199, null, "", NaN]; + const invalidStatus = [100, 600, 199, null, "", NaN]; for (const status of invalidStatus) { try { @@ -980,7 +980,11 @@ Deno.test(function fetchResponseConstructorInvalidStatus() { fail(`Invalid status: ${status}`); } catch (e) { assert(e instanceof RangeError); - assert(e.message.endsWith("is outside the range [200, 599].")); + assert( + e.message.endsWith( + "is not equal to 101 and outside the range [200, 599].", + ), + ); } } }); -- cgit v1.2.3