diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/error_024_stack_promise_all.ts | 13 | ||||
-rw-r--r-- | cli/tests/error_024_stack_promise_all.ts.out | 8 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 7 |
3 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/error_024_stack_promise_all.ts b/cli/tests/error_024_stack_promise_all.ts new file mode 100644 index 000000000..5334e8d77 --- /dev/null +++ b/cli/tests/error_024_stack_promise_all.ts @@ -0,0 +1,13 @@ +const p = Promise.all([ + (async (): Promise<never> => { + await Promise.resolve(); + throw new Error("Promise.all()"); + })(), +]); + +try { + await p; +} catch (error) { + console.log(error.stack); + throw error; +} diff --git a/cli/tests/error_024_stack_promise_all.ts.out b/cli/tests/error_024_stack_promise_all.ts.out new file mode 100644 index 000000000..38cb4ac31 --- /dev/null +++ b/cli/tests/error_024_stack_promise_all.ts.out @@ -0,0 +1,8 @@ +[WILDCARD]Error: Promise.all() + at [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD] + at async Promise.all (index 0) + at async [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD] +error: Uncaught Error: Promise.all() + at [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD] + at async Promise.all (index 0) + at async [WILDCARD]tests/error_024_stack_promise_all.ts:[WILDCARD] diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index d043958a9..905870c29 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1406,6 +1406,13 @@ itest!(error_023_stack_async { exit_code: 1, }); +itest!(error_024_stack_promise_all { + args: "error_024_stack_promise_all.ts", + output: "error_024_stack_promise_all.ts.out", + check_stderr: true, + exit_code: 1, +}); + itest!(error_syntax { args: "run --reload error_syntax.js", check_stderr: true, |