#mutation's isLoading is not set to true in my vitest test

2 messages · Page 1 of 1 (latest)

tall robin
#

if I put a small delay in the mutationFn it works but it's not a viable solution, what would you do in that case:

await new Promise((res) => setTimeout(res, 10));
const updatedCampaign = await apiClient.v1.experiment.patch({ accountId, testId: campaignId, payload });
tall robin
#

Or if you have doc link, it could be nice :)