Skip to content

Commit

Permalink
add url test
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen committed Aug 16, 2020
1 parent 4683e34 commit f38b14c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/path/",
},
};
assertEquals(
resolve("path/mod.ts", importMap),
"https://deno.land/[email protected]/path/mod.ts",
);
});

0 comments on commit f38b14c

Please sign in to comment.