-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Bug Report] WaitUntil does not close handlers so jest stuck and waits #32
Comments
Workaround is to disable timing out: {
timeout: Number.POSITIVE_INFINITY,
} To fix this, the promise returned by |
@aldeed the problem's never-ending predicate support – and not the |
@devlato Maybe I'm not understanding you. I meant that adding an infinite timeout solved this for me because it then doesn't call The way I would normally fix this in the code is something like: let otherPromiseResolved = false;
const delay = (delayMs) => {
const start = Date.now();
return new Promise((resolve) => {
const interval = setInterval(() => {
if (Date.now() - start > delayMs || otherPromiseResolved) {
clearInterval(interval);
resolve();
}
}, 500);
)
}
// When the promise that `delay` is racing against resolves, set otherPromiseResolved = true. The key point being to somehow inform |
@npwork Very much interested in a solution here or an alternative. This is blocking our test suite as well. |
@NerdishShah will try and fix it this weekend - thanks for reminding me! |
May I ask if there's any update on this? |
A gentle reminder |
Describe the bug
waitUntil does not close all open handlers so jest sits and waits
To Reproduce
Steps to reproduce the behavior:
You will see
Expected behavior
All handlers are closed
Screenshots
If you run with
--detectOpenHandles
you will seeAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: