Skip to content

Commit 64241b8

Browse files
authored
test(query-core/{hydration,queriesObserver}): remove unnecessary 'async' from tests without 'await' (#11035)
1 parent bb68fa0 commit 64241b8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/query-core/src/__tests__/hydration.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@ describe('dehydration and rehydration', () => {
16431643
// synchronous thenable resolution must also produce status: 'success'.
16441644
// Previously the if (query) branch would spread status: 'pending' from the
16451645
// server state without correcting it for the resolved data.
1646-
it('should set status to success when rehydrating an existing pending query with a synchronously resolved promise', async () => {
1646+
it('should set status to success when rehydrating an existing pending query with a synchronously resolved promise', () => {
16471647
const key = queryKey()
16481648
// --- server ---
16491649

@@ -1811,7 +1811,7 @@ describe('dehydration and rehydration', () => {
18111811
serverQueryClient.clear()
18121812
})
18131813

1814-
it('should set dataUpdatedAt when hydrating a resolved streamed query into a new cache entry', async () => {
1814+
it('should set dataUpdatedAt when hydrating a resolved streamed query into a new cache entry', () => {
18151815
const key = queryKey()
18161816

18171817
// --- server ---
@@ -1856,7 +1856,7 @@ describe('dehydration and rehydration', () => {
18561856
serverQueryClient.clear()
18571857
})
18581858

1859-
it('should set dataUpdatedAt when hydrating a resolved streamed query into an existing cache entry', async () => {
1859+
it('should set dataUpdatedAt when hydrating a resolved streamed query into an existing cache entry', () => {
18601860
const key = queryKey()
18611861

18621862
// --- server ---

packages/query-core/src/__tests__/queriesObserver.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ describe('queriesObserver', () => {
473473
expect(newCombined.count).toBe(2)
474474
})
475475

476-
it('should skip combine notifications while suspense queries have no data', async () => {
476+
it('should skip combine notifications while suspense queries have no data', () => {
477477
const key = queryKey()
478478
const combine = vi.fn((results: Array<QueryObserverResult>) =>
479479
results.map((result) => result.data),
@@ -506,7 +506,7 @@ describe('queriesObserver', () => {
506506
unsubscribe()
507507
})
508508

509-
it('should skip combine notifications after suspense is enabled without structural changes', async () => {
509+
it('should skip combine notifications after suspense is enabled without structural changes', () => {
510510
const key = queryKey()
511511
const combine = vi.fn((results: Array<QueryObserverResult>) =>
512512
results.map((result) => result.data),

0 commit comments

Comments
 (0)