diff options
Diffstat (limited to 'cli/tests/unit')
| -rw-r--r-- | cli/tests/unit/fetch_test.ts | 11 | ||||
| -rw-r--r-- | cli/tests/unit/request_test.ts | 8 | ||||
| -rwxr-xr-x | cli/tests/unit/unit_test_runner.ts | 1 |
3 files changed, 6 insertions, 14 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts index e5389d024..6945b2e2a 100644 --- a/cli/tests/unit/fetch_test.ts +++ b/cli/tests/unit/fetch_test.ts @@ -221,17 +221,6 @@ unitTest({ perms: { net: true } }, async function responseClone(): Promise< } }); -unitTest({ perms: { net: true } }, async function fetchEmptyInvalid(): Promise< - void -> { - await assertThrowsAsync( - async () => { - await fetch(""); - }, - URIError, - ); -}); - unitTest( { perms: { net: true } }, async function fetchMultipartFormDataSuccess(): Promise<void> { diff --git a/cli/tests/unit/request_test.ts b/cli/tests/unit/request_test.ts index 8132e0184..da6a0e15b 100644 --- a/cli/tests/unit/request_test.ts +++ b/cli/tests/unit/request_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, assertThrows, unitTest } from "./test_util.ts"; +import { assert, assertEquals, unitTest } from "./test_util.ts"; unitTest(function fromInit(): void { const req = new Request("http://foo/", { @@ -46,8 +46,10 @@ unitTest(function methodNonString(): void { }); unitTest(function requestRelativeUrl(): void { - // TODO(nayeemrmn): Base from `--location` when implemented and set. - assertThrows(() => new Request("relative-url"), TypeError, "Invalid URL."); + assertEquals( + new Request("relative-url").url, + "http://js-unit-tests/foo/relative-url", + ); }); unitTest(async function cloneRequestBodyStream(): Promise<void> { diff --git a/cli/tests/unit/unit_test_runner.ts b/cli/tests/unit/unit_test_runner.ts index 35a691ebd..1f347ec9a 100755 --- a/cli/tests/unit/unit_test_runner.ts +++ b/cli/tests/unit/unit_test_runner.ts @@ -97,6 +97,7 @@ function spawnWorkerRunner( Deno.execPath(), "run", "--unstable", // TODO(ry) be able to test stable vs unstable + "--location=http://js-unit-tests/foo/bar", "-A", "cli/tests/unit/unit_test_runner.ts", "--worker", |
