From 66ff7e5d047f24e6c5178694e414e3865235481b Mon Sep 17 00:00:00 2001 From: shadowtime2000 <66655515+shadowtime2000@users.noreply.github.com> Date: Tue, 6 Oct 2020 19:43:01 -0700 Subject: [PATCH] Increase Coverage --- mod/path_test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/path_test.ts b/mod/path_test.ts index 24b58a1..a098d82 100644 --- a/mod/path_test.ts +++ b/mod/path_test.ts @@ -1,4 +1,4 @@ -import { assert } from "https://deno.land/std/testing/asserts.ts"; +import { assert, assertThrows } from "https://deno.land/std/testing/asserts.ts"; import path from "./path.ts"; Deno.test({ @@ -7,5 +7,6 @@ Deno.test({ const __path = path(import.meta); assert(!__path.startsWith("file:///")); assert(/[\\|//]/.test(__path)); + assertThrows(() => path({ url: "https://foo.bar", main: false }), Error, "You should not be using this in a hosted a script!"); }, -}); +}); \ No newline at end of file