From 47c2a63d872886ae1d0576f3cbf630151c8ff129 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Tue, 27 Feb 2024 08:05:57 -0700 Subject: chore: bump deno_core (#22596) Migrations: - snapshot code updated - runtime stats API tweaks --- tests/integration/repl_tests.rs | 13 +++++++++++++ tests/testdata/repl/promise_rejection.ts | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/testdata/repl/promise_rejection.ts (limited to 'tests') diff --git a/tests/integration/repl_tests.rs b/tests/integration/repl_tests.rs index 0e63f1589..7a09f904e 100644 --- a/tests/integration/repl_tests.rs +++ b/tests/integration/repl_tests.rs @@ -1119,3 +1119,16 @@ fn pty_promise_was_collected_regression_test() { assert_contains!(out, "Uint8Array(67108864)"); assert!(err.is_empty()); } + +#[test] +fn eval_file_promise_error() { + let (out, err) = util::run_and_collect_output_with_args( + true, + vec!["repl", "--eval-file=./repl/promise_rejection.ts"], + None, + None, + false, + ); + assert_contains!(out, "Uncaught undefined"); + assert!(err.is_empty()); +} diff --git a/tests/testdata/repl/promise_rejection.ts b/tests/testdata/repl/promise_rejection.ts new file mode 100644 index 000000000..c6c3bcbd0 --- /dev/null +++ b/tests/testdata/repl/promise_rejection.ts @@ -0,0 +1,6 @@ +// Regression test for https://github.com/denoland/deno/issues/22592 +// deno-lint-ignore require-await +async function rejects() { + return Promise.reject(); +} +await rejects(); -- cgit v1.2.3