mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
fix(cli): fix panic in Deno.emit (#9302)
This commit is contained in:
parent
6ecc86cf2a
commit
fc162162a1
2 changed files with 25 additions and 3 deletions
|
@ -292,3 +292,16 @@ Deno.test({
|
|||
assert(diagnostics[0].messageText.includes("This import is never used"));
|
||||
},
|
||||
});
|
||||
|
||||
Deno.test({
|
||||
name: "Deno.emit() - Unknown media type does not panic",
|
||||
async fn() {
|
||||
await assertThrowsAsync(async () => {
|
||||
await Deno.emit("https://example.com/foo", {
|
||||
sources: {
|
||||
"https://example.com/foo": `let foo: string = "foo";`,
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue