(argCode: string)
| 22 | * Logic: new URL(ARG, (typeof location !== "undefined" ? location.origin : import.meta.url)).href |
| 23 | */ |
| 24 | const wrapRoot = (argCode: string) => { |
| 25 | const base = |
| 26 | `(typeof location !== "undefined" ? location.origin : import.meta.url)`; |
| 27 | return `new URL(${argCode}, ${base}).href`; |
| 28 | }; |
| 29 | |
| 30 | Deno.test("Patch: Explicit relative path (double quotes)", () => { |
| 31 | const input = `await import("./foo.js")`; |