diff options
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r-- | cli/tests/integration/repl_tests.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs index d9966fe8f..f8987e20b 100644 --- a/cli/tests/integration/repl_tests.rs +++ b/cli/tests/integration/repl_tests.rs @@ -825,6 +825,20 @@ fn repl_report_error() { } #[test] +fn repl_error_undefined() { + util::with_pty(&["repl"], |mut console| { + console.write_line(r#"throw undefined;"#); + console.expect("Uncaught undefined"); + console.write_line(r#"Promise.reject();"#); + console.expect("Promise { <rejected> undefined }"); + console.expect("Uncaught (in promise) undefined"); + console.write_line(r#"reportError(undefined);"#); + console.expect("undefined"); + console.expect("Uncaught undefined"); + }); +} + +#[test] fn pty_aggregate_error() { util::with_pty(&["repl"], |mut console| { console.write_line("await Promise.any([])"); |