diff --git a/node/url.ts b/node/url.ts index 826a274f85a6..577c5eaf278f 100644 --- a/node/url.ts +++ b/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/node/url_test.ts b/node/url_test.ts new file mode 100644 index 000000000000..5e64b6295900 --- /dev/null +++ b/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); + }, +});