Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning a rejected Promise inside the test function results in an UnhandledPromiseRejection #1326

Closed
danielrearden opened this issue Apr 4, 2021 · 0 comments · Fixed by #1327

Comments

@danielrearden
Copy link
Contributor

Describe the bug
Returning a rejected Promise inside the test function causes an unhandled Promise rejection

To Reproduce

See this notebook in RunKit for a reproduction of the issue.

Expected behavior
If the returned Promise is rejected, validate should also reject with the underlying error without raising an unhandledRejection exception. This is particularly problematic in Node 15 and on since unhandled rejections are no longer just a warning.

Platform (please complete the following information):

  • Node.js

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant