From 455b0eb8bb8445f80d9c80a9161f18c1dede5733 Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Tue, 6 Jun 2023 22:06:30 +0100 Subject: fix(repl): correctly print string exception (#19391) Fixes a recent regression where `throw "hello"` in the repl prints `Uncaught undefined` instead of `throw "hello"` --- cli/tests/integration/repl_tests.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index e6fc7aa91..77a534d2e 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -814,6 +814,10 @@ fn repl_reject() { console.expect(" at "); console.write_line("console.log(2);"); console.expect("2"); + console.write_line(r#"throw "hello";"#); + console.expect(r#"Uncaught "hello""#); + console.write_line(r#"throw `hello ${"world"}`;"#); + console.expect(r#"Uncaught "hello world""#); }); } -- cgit v1.2.3