mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
fix(cli): fix handling of non-normalized specifier (#9357)
This commit is contained in:
parent
534531e4dd
commit
23281be33a
2 changed files with 55 additions and 7 deletions
|
@ -305,3 +305,17 @@ Deno.test({
|
|||
});
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "Deno.emit() - non-normalized specifier and source can compile",
|
||||
async fn() {
|
||||
const specifier = "https://example.com/foo//bar.ts";
|
||||
const { files } = await Deno.emit(specifier, {
|
||||
sources: {
|
||||
[specifier]: `export let foo: string = "foo";`,
|
||||
},
|
||||
});
|
||||
assertEquals(files[`${specifier}.js`], 'export let foo = "foo";\n');
|
||||
assert(typeof files[`${specifier}.js.map`] === "string");
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue