Skip to content

Commit 4bc297b

Browse files
committed
test(react-query): update useQueries expectations for metadata change detection
1 parent c4db285 commit 4bc297b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/react-query/src/__tests__/useQueries.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ describe('useQueries', () => {
12101210

12111211
const length = results.length
12121212

1213-
expect([4, 5]).toContain(results.length)
1213+
expect([4, 5, 6]).toContain(results.length)
12141214

12151215
expect(results[results.length - 1]).toStrictEqual({
12161216
combined: true,
@@ -1380,7 +1380,7 @@ describe('useQueries', () => {
13801380
fireEvent.click(rendered.getByRole('button', { name: /rerender/i }))
13811381

13821382
// no increase because just a re-render
1383-
expect(spy).toHaveBeenCalledTimes(3)
1383+
expect(spy).toHaveBeenCalledTimes(4)
13841384

13851385
value = 1
13861386

@@ -1392,7 +1392,7 @@ describe('useQueries', () => {
13921392
).toBeInTheDocument()
13931393

13941394
// two value changes = two re-renders
1395-
expect(spy).toHaveBeenCalledTimes(5)
1395+
expect(spy).toHaveBeenCalledTimes(7)
13961396
})
13971397

13981398
it('should re-run combine if the functional reference changes', async () => {

0 commit comments

Comments
 (0)