-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
e9f02c2
commit 12e700b
Showing
4 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Check [WILDCARD] | ||
running 2 tests | ||
test unresolved promise ... in promise | ||
error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
}, | ||
}); |