diff --git a/packages/toolkit/src/query/tests/errorHandling.test.tsx b/packages/toolkit/src/query/tests/errorHandling.test.tsx index f5a611ec10..010f5e1860 100644 --- a/packages/toolkit/src/query/tests/errorHandling.test.tsx +++ b/packages/toolkit/src/query/tests/errorHandling.test.tsx @@ -648,7 +648,7 @@ describe('error handling in a component', () => { ) }) const unwrappedPromise = mutationqueryFulfilled!.unwrap() - expect(unwrappedPromise).rejects.toMatchObject({ + await expect(unwrappedPromise).rejects.toMatchObject({ status: 500, data: { value: 'error' }, })