diff --git a/std/node/url.ts b/std/node/url.ts index 826a274f85..577c5eaf27 100644 --- a/std/node/url.ts +++ b/std/node/url.ts @@ -36,6 +36,9 @@ const newlineRegEx = /\n/g; const carriageReturnRegEx = /\r/g; const tabRegEx = /\t/g; +const _url = URL; +export { _url as URL }; + export function fileURLToPath(path: string | URL): string { if (typeof path === "string") path = new URL(path); else if (!(path instanceof URL)) { diff --git a/std/node/url_test.ts b/std/node/url_test.ts new file mode 100644 index 0000000000..5e64b62959 --- /dev/null +++ b/std/node/url_test.ts @@ -0,0 +1,9 @@ +import { assertEquals } from "../testing/asserts.ts"; +import * as url from "./url.ts"; + +Deno.test({ + name: "[url] URL", + fn() { + assertEquals(url.URL, URL); + }, +});