summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_024_stack_promise_all.ts
blob: 8ca7b203c9d6fddac91ac45f810fc46b72c19c16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}