summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_024_stack_promise_all.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/run/error_024_stack_promise_all.ts')
-rw-r--r--tests/testdata/run/error_024_stack_promise_all.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testdata/run/error_024_stack_promise_all.ts b/tests/testdata/run/error_024_stack_promise_all.ts
new file mode 100644
index 000000000..8ca7b203c
--- /dev/null
+++ b/tests/testdata/run/error_024_stack_promise_all.ts
@@ -0,0 +1,16 @@
+const p = Promise.all([
+ Promise.resolve(),
+ (async (): Promise<never> => {
+ await Promise.resolve();
+ throw new Error("Promise.all()");
+ })(),
+]);
+
+try {
+ await p;
+} catch (error) {
+ if (error instanceof Error) {
+ console.log(error.stack);
+ }
+ throw error;
+}