-
Notifications
You must be signed in to change notification settings - Fork 934
Description
Describe the solution
I'm using unstable_dev extensively in testing right now but just hit a roadblock. I have a fetch being done in a waitUntil
which I need to happen before all my expects
.
There is no way to wait for this today in unstable_dev
from what I can tell. It would be great to have a function on UnstableDevWorker
like waitForWaitUntils
.
Miniflare does have something for this already: https://miniflare.dev/testing/vitest#waiting-for-waituntiled-promises
However, this requires me to use the Miniflare test env. I want to avoid this and rely on solely Wrangler here. A lot of users may not even know that Miniflare will run these tests so there needs to be some option in Wrangler (not to forget you can also use workerd
though still through Miniflare)
Regardless, this would be great to have before dev
goes stable :)
cc: @rozenmd