diff --git a/packages/toolkit/src/query/tests/cleanup.test.tsx b/packages/toolkit/src/query/tests/cleanup.test.tsx index 5aebc49758..e9b9b95992 100644 --- a/packages/toolkit/src/query/tests/cleanup.test.tsx +++ b/packages/toolkit/src/query/tests/cleanup.test.tsx @@ -177,8 +177,6 @@ test('Minimizes the number of subscription dispatches when multiple components a return <>{listItems} } - const start = Date.now() - render(, { wrapper: storeRef.wrapper, }) @@ -189,10 +187,6 @@ test('Minimizes the number of subscription dispatches when multiple components a return screen.getAllByText(/42/).length > 0 }) - const end = Date.now() - - const timeElapsed = end - start - const subscriptions = getSubscriptionsA() expect(Object.keys(subscriptions!).length).toBe(NUM_LIST_ITEMS) @@ -203,7 +197,4 @@ test('Minimizes the number of subscription dispatches when multiple components a // 'api/executeQuery/fulfilled' // ] expect(actionTypes.length).toBe(4) - // Could be flaky in CI, but we'll see. - // Currently seeing 1000ms in local dev, 6300 without the batching fixes - expect(timeElapsed).toBeLessThan(2500) }, 25000) diff --git a/packages/toolkit/src/query/tests/devWarnings.test.tsx b/packages/toolkit/src/query/tests/devWarnings.test.tsx index c52f46dea6..eaed15e1fd 100644 --- a/packages/toolkit/src/query/tests/devWarnings.test.tsx +++ b/packages/toolkit/src/query/tests/devWarnings.test.tsx @@ -346,8 +346,12 @@ In the case of an unhandled error, no tags will be "provided" or "invalidated". return { error: {} } }, endpoints: (build) => ({ - transformErRspn: build.query({ - query() {}, + // @ts-ignore TS doesn't like `() => never` for `tER` + transformErRspn: build.query({ + queryFn() { + return { data: 42 } + }, + // @ts-ignore TS doesn't like `() => never` for `tER` transformErrorResponse() { throw new Error('this was kinda expected') },