diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-01-29 10:33:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 10:33:58 +0900 |
commit | fc162162a155faf088f2b1a3343597c66d59d98c (patch) | |
tree | be6831e9c52152753147fb4376815ab42325720f /cli/tests/compiler_api_test.ts | |
parent | 6ecc86cf2ae4bb0aac6f3d0e954382a69176b387 (diff) |
fix(cli): fix panic in Deno.emit (#9302)
Diffstat (limited to 'cli/tests/compiler_api_test.ts')
-rw-r--r-- | cli/tests/compiler_api_test.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/compiler_api_test.ts b/cli/tests/compiler_api_test.ts index 17c02b0e5..99c7af961 100644 --- a/cli/tests/compiler_api_test.ts +++ b/cli/tests/compiler_api_test.ts @@ -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";`, + }, + }); + }); + }, +}); |