From f38b14c0d675ba887648e6838947d6080b5c2f71 Mon Sep 17 00:00:00 2001 From: Tim Reichen Date: Sun, 16 Aug 2020 23:13:03 +0200 Subject: [PATCH] add url test --- test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test.ts b/test.ts index 3ffcd3e..f08c9e3 100644 --- a/test.ts +++ b/test.ts @@ -43,3 +43,15 @@ Deno.test("resolve imports with scopes", () => { assertEquals(resolve("b", importMap, "/scope2/scope3/foo.mjs"), "/b-3.mjs"); assertEquals(resolve("c", importMap, "/scope2/scope3/foo.mjs"), "/c-1.mjs"); }); + +Deno.test("resolve url", () => { + const importMap = { + imports: { + "path/": "https://deno.land/std@0.65.0/path/", + }, + }; + assertEquals( + resolve("path/mod.ts", importMap), + "https://deno.land/std@0.65.0/path/mod.ts", + ); +});