summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/integration/run_tests.rs7
-rw-r--r--cli/tests/testdata/report_error_end_of_program.ts1
-rw-r--r--cli/tests/testdata/report_error_end_of_program.ts.out4
3 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index adaa6d49d..9c60cc745 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -2738,6 +2738,13 @@ itest!(report_error_handled {
output: "report_error_handled.ts.out",
});
+// Regression test for https://github.com/denoland/deno/issues/15513.
+itest!(report_error_end_of_program {
+ args: "run --quiet report_error_end_of_program.ts",
+ output: "report_error_end_of_program.ts.out",
+ exit_code: 1,
+});
+
itest!(spawn_stdout_inherit {
args: "run --quiet --unstable -A spawn_stdout_inherit.ts",
output: "spawn_stdout_inherit.ts.out",
diff --git a/cli/tests/testdata/report_error_end_of_program.ts b/cli/tests/testdata/report_error_end_of_program.ts
new file mode 100644
index 000000000..cd7ce7f9c
--- /dev/null
+++ b/cli/tests/testdata/report_error_end_of_program.ts
@@ -0,0 +1 @@
+reportError(new Error("foo"));
diff --git a/cli/tests/testdata/report_error_end_of_program.ts.out b/cli/tests/testdata/report_error_end_of_program.ts.out
new file mode 100644
index 000000000..ecca63389
--- /dev/null
+++ b/cli/tests/testdata/report_error_end_of_program.ts.out
@@ -0,0 +1,4 @@
+error: Uncaught Error: foo
+reportError(new Error("foo"));
+ ^
+ at [WILDCARD]/report_error_end_of_program.ts:1:13