-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
While testing upsertQueryData
, I was doing something like this:
const fetchRes = dispatch(post.initiate('3'))
const upsertRes = dispatch(upsert('post', '3', {obj}))
await upsertRes;
expect(data).toEqual(upsertedData)
await fetchRes
expect(data).toEqual(fetchedData)
including a queryFn
that was supposed to wait some delay before resolving.
Except it never worked. when I added a bunch of logging, the upsert did indeed update the state first, then the fetch, but somehow the upsertRes
promise never resolved until the fetch update was complete. I couldn't figure out if it was a problem with my test code, or the "running promises" logic.
This may be related to #2477 / #2481 in some way, or it could be a different promises bug.
JulienKode
Metadata
Metadata
Assignees
Labels
No labels