summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/test/unhandled_rejection.out
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2022-05-09 10:44:50 +0100
committerGitHub <noreply@github.com>2022-05-09 11:44:50 +0200
commit23efc4fcab2ca3b8b47539a7fb1d904efc57eb7c (patch)
tree54dd76ef9d2071245c9ad28610f78c72937546eb /cli/tests/testdata/test/unhandled_rejection.out
parentab728e9ccfff2d1ac6362b22b579b00120a39f67 (diff)
feat(test): Represent uncaught errors (#14513)
This commit adds better reporting of uncaught errors in top level scope of testing files. This change affects both console runner as well as LSP runner.
Diffstat (limited to 'cli/tests/testdata/test/unhandled_rejection.out')
-rw-r--r--cli/tests/testdata/test/unhandled_rejection.out16
1 files changed, 14 insertions, 2 deletions
diff --git a/cli/tests/testdata/test/unhandled_rejection.out b/cli/tests/testdata/test/unhandled_rejection.out
index fae353a28..50b0ad6ab 100644
--- a/cli/tests/testdata/test/unhandled_rejection.out
+++ b/cli/tests/testdata/test/unhandled_rejection.out
@@ -1,10 +1,22 @@
Check [WILDCARD]/test/unhandled_rejection.ts
+Uncaught error from ./test/unhandled_rejection.ts FAILED
-test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+ ERRORS
-error: Uncaught (in promise) Error: rejection
+./test/unhandled_rejection.ts (uncaught error)
+error: (in promise) Error: rejection
reject(new Error("rejection"));
^
at [WILDCARD]/test/unhandled_rejection.ts:2:10
at new Promise (<anonymous>)
at [WILDCARD]/test/unhandled_rejection.ts:1:1
+This error was not caught from a test and caused the test runner to fail on the referenced module.
+It most likely originated from a dangling promise, event/timeout handler or top-level code.
+
+ FAILURES
+
+./test/unhandled_rejection.ts (uncaught error)
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD])
+
+error: Test failed