summaryrefslogtreecommitdiff
path: root/cli/tests/error_023_stack_async.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/error_023_stack_async.ts')
-rw-r--r--cli/tests/error_023_stack_async.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/error_023_stack_async.ts b/cli/tests/error_023_stack_async.ts
new file mode 100644
index 000000000..621933576
--- /dev/null
+++ b/cli/tests/error_023_stack_async.ts
@@ -0,0 +1,12 @@
+const p = (async (): Promise<void> => {
+ await Promise.resolve().then((): never => {
+ throw new Error("async");
+ });
+})();
+
+try {
+ await p;
+} catch (error) {
+ console.log(error.stack);
+ throw error;
+}