Skip to content

Commit 9852028

Browse files
committed
tests: stabilize
we don't care about intermediate results, and they might be render-batched
1 parent 819390e commit 9852028

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/reactjs/tests/useQueries.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,13 +1058,14 @@ describe('useQueries', () => {
10581058

10591059
await sleep(30)
10601060

1061-
expect(results.length).toBe(3)
10621061
expect(results[0]).toMatchObject([
10631062
{ data: undefined },
10641063
{ data: undefined },
10651064
])
1066-
expect(results[1]).toMatchObject([{ data: 1 }, { data: undefined }])
1067-
expect(results[2]).toMatchObject([{ data: 1 }, { data: 2 }])
1065+
expect(results[results.length - 1]).toMatchObject([
1066+
{ data: 1 },
1067+
{ data: 2 },
1068+
])
10681069
})
10691070

10701071
it('should throw if the context is necessary and is not passed to useQueries', async () => {

0 commit comments

Comments
 (0)