diff --git a/js/allow_leak_test.ts b/js/allow_leak_test.ts new file mode 100644 index 00000000..3ec5a75e --- /dev/null +++ b/js/allow_leak_test.ts @@ -0,0 +1,19 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. + +import { assertRejects } from "jsr:@std/assert@0.223"; +import { doc } from "./mod.ts"; + +Deno.test({ + name: "doc() - missing specifier", + // TODO(@kitsonk) - remove when new deno_graph crate published + sanitizeResources: false, + async fn() { + await assertRejects( + async () => { + await doc("https://deno.land/x/bad.ts"); + }, + Error, + `Module not found "https://deno.land/x/bad.ts".`, + ); + }, +}); diff --git a/js/test.ts b/js/test.ts index 295cde16..0c8328fc 100644 --- a/js/test.ts +++ b/js/test.ts @@ -76,21 +76,6 @@ Deno.test({ }, }); -Deno.test({ - name: "doc() - missing specifier", - // TODO(@kitsonk) - remove when new deno_graph crate published - sanitizeResources: false, - async fn() { - await assertRejects( - async () => { - await doc("https://deno.land/x/bad.ts"); - }, - Error, - `Module not found "https://deno.land/x/bad.ts".`, - ); - }, -}); - Deno.test({ name: "doc() - bad specifier", async fn() {