summaryrefslogtreecommitdiff
path: root/cli/tests/test_unresolved_promise.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-10-14 15:19:13 +0200
committerGitHub <noreply@github.com>2020-10-14 15:19:13 +0200
commit12e700bddfad8c23f6b55baca4ca4afb8337af26 (patch)
tree54c6943cc725e70153db2ef8536c6e6c82b4de9f /cli/tests/test_unresolved_promise.js
parente9f02c231473ba42f506a895734d445cd31d379f (diff)
fix(test): return error when awaiting unresolved promise (#7968)
This commit fixes test runner by awaitning "Deno.runTests()" call, which ensures proper error is returned when there's an unresolved promise that's being awaited.
Diffstat (limited to 'cli/tests/test_unresolved_promise.js')
-rw-r--r--cli/tests/test_unresolved_promise.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/test_unresolved_promise.js b/cli/tests/test_unresolved_promise.js
new file mode 100644
index 000000000..466b18864
--- /dev/null
+++ b/cli/tests/test_unresolved_promise.js
@@ -0,0 +1,15 @@
+Deno.test({
+ name: "unresolved promise",
+ fn() {
+ return new Promise((_resolve, _reject) => {
+ console.log("in promise");
+ });
+ },
+});
+
+Deno.test({
+ name: "ok",
+ fn() {
+ console.log("ok test");
+ },
+});