diff options
author | Anonymous <65428781+CrimsonCodes0@users.noreply.github.com> | 2021-05-03 00:05:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 09:05:42 +0200 |
commit | 688557e226d6ec25e6a0514fcd01a2153ce612a5 (patch) | |
tree | 7bacaa527f6b6fa2cd6363826eb2e3f6b2ff3726 /cli/tests/unit/fetch_test.ts | |
parent | ea917384feb1c800438d13dddac9ee977d2c47fe (diff) |
fix(op_crates/fetch): check fetch() argument length (#10474)
Diffstat (limited to 'cli/tests/unit/fetch_test.ts')
-rw-r--r-- | cli/tests/unit/fetch_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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<void> { + await assertThrowsAsync( + fetch as unknown as () => Promise<void>, + TypeError, + ); + }, +); + unitTest({ perms: { net: true } }, async function fetchProtocolError(): Promise< void > { |