From 688557e226d6ec25e6a0514fcd01a2153ce612a5 Mon Sep 17 00:00:00 2001 From: Anonymous <65428781+CrimsonCodes0@users.noreply.github.com> Date: Mon, 3 May 2021 00:05:42 -0700 Subject: fix(op_crates/fetch): check fetch() argument length (#10474) --- cli/tests/unit/fetch_test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index e046e9c03..e73953a5c 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -9,6 +9,16 @@ import { } from "./test_util.ts"; import { Buffer } from "../../../test_util/std/io/buffer.ts"; +unitTest( + { perms: { net: true } }, + async function fetchRequiresOneArgument(): Promise { + await assertThrowsAsync( + fetch as unknown as () => Promise, + TypeError, + ); + }, +); + unitTest({ perms: { net: true } }, async function fetchProtocolError(): Promise< void > { -- cgit v1.2.3