From 73a90360894267c69365d97f535a3573861e4ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 15 Jul 2020 14:23:17 +0200 Subject: fix: panic for runtime error in TS compiler (#6758) --- cli/tests/compiler_js_error.ts | 1 + cli/tests/compiler_js_error.ts.out | 7 +++++++ cli/tests/integration_tests.rs | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 cli/tests/compiler_js_error.ts create mode 100644 cli/tests/compiler_js_error.ts.out (limited to 'cli/tests') diff --git a/cli/tests/compiler_js_error.ts b/cli/tests/compiler_js_error.ts new file mode 100644 index 000000000..0b981ae3a --- /dev/null +++ b/cli/tests/compiler_js_error.ts @@ -0,0 +1 @@ +Deno.compile("main.js", { "main.js": "console.log(foo);" }); diff --git a/cli/tests/compiler_js_error.ts.out b/cli/tests/compiler_js_error.ts.out new file mode 100644 index 000000000..8f1556731 --- /dev/null +++ b/cli/tests/compiler_js_error.ts.out @@ -0,0 +1,7 @@ +Check [WILDCARD]compiler_js_error.ts +error: Uncaught Error: Error in TS compiler: +Uncaught AssertionError: Unexpected skip of the emit. +[WILDCARD] + at unwrapResponse ($deno$/ops/dispatch_json.ts:[WILDCARD]) + at Object.sendAsync ($deno$/ops/dispatch_json.ts:[WILDCARD]) + at async Object.compile ($deno$/compiler_api.ts:[WILDCARD]) diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 4df7a8268..f832358ff 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -2188,6 +2188,12 @@ itest!(deno_lint_glob { exit_code: 1, }); +itest!(compiler_js_error { + args: "run --unstable compiler_js_error.ts", + output: "compiler_js_error.ts.out", + exit_code: 1, +}); + #[test] fn cafile_env_fetch() { use url::Url; -- cgit v1.2.3