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