Skip to content

Commit

Permalink
Remove time-sensitive CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Aug 16, 2022
1 parent c887f6c commit 53e2b61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
9 changes: 0 additions & 9 deletions packages/toolkit/src/query/tests/cleanup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ test('Minimizes the number of subscription dispatches when multiple components a
return <>{listItems}</>
}

const start = Date.now()

render(<ParentComponent />, {
wrapper: storeRef.wrapper,
})
Expand All @@ -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)
Expand All @@ -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)
8 changes: 6 additions & 2 deletions packages/toolkit/src/query/tests/devWarnings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<any, void>({
query() {},
// @ts-ignore TS doesn't like `() => never` for `tER`
transformErRspn: build.query<number, void>({
queryFn() {
return { data: 42 }
},
// @ts-ignore TS doesn't like `() => never` for `tER`
transformErrorResponse() {
throw new Error('this was kinda expected')
},
Expand Down

0 comments on commit 53e2b61

Please sign in to comment.