diff options
Diffstat (limited to 'std/node')
-rw-r--r-- | std/node/url.ts | 3 | ||||
-rw-r--r-- | std/node/url_test.ts | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/std/node/url.ts b/std/node/url.ts index 826a274f8..577c5eaf2 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 000000000..5e64b6295 --- /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); + }, +}); |