Skip to content

Commit 390a5cb

Browse files
committed
remove async
1 parent 9ad919a commit 390a5cb

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

packages/angular-query-experimental/src/__tests__/inject-is-mutating.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('injectIsMutating', () => {
3131
vi.useRealTimers()
3232
})
3333

34-
test('should properly return isMutating state', async () => {
34+
test('should properly return isMutating state', () => {
3535
TestBed.runInInjectionContext(() => {
3636
const isMutating = injectIsMutating()
3737
const mutation = injectMutation(() => ({

packages/angular-query-experimental/src/__tests__/inject-mutation.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('injectMutation', () => {
120120
})
121121
})
122122

123-
test('reactive options should update mutation', async () => {
123+
test('reactive options should update mutation', () => {
124124
const mutationCache = queryClient.getMutationCache()
125125
// Signal will be updated before the mutation is called
126126
// this test confirms that the mutation uses the updated value

packages/angular-query-experimental/src/__tests__/inject-query.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ describe('injectQuery', () => {
232232
...options,
233233
}))
234234
const fromWrappedQuery = TestBed.runInInjectionContext(() =>
235-
createWrappedQuery([''], async () => '1'),
235+
createWrappedQuery([''], () => Promise.resolve('1')),
236236
)
237237
expectTypeOf(fromWrappedQuery.data()).toEqualTypeOf<string | undefined>()
238238

@@ -252,7 +252,7 @@ describe('injectQuery', () => {
252252
>,
253253
) => injectQuery(() => ({ queryKey: qk, queryFn: fetcher, ...options }))
254254
const fromWrappedFuncStyleQuery = TestBed.runInInjectionContext(() =>
255-
createWrappedFuncStyleQuery([''], async () => true),
255+
createWrappedFuncStyleQuery([''], () => Promise.resolve(true)),
256256
)
257257
expectTypeOf(fromWrappedFuncStyleQuery.data()).toEqualTypeOf<
258258
boolean | undefined

packages/query-devtools/src/__tests__/utils.test.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { deleteNestedDataByPath, updateNestedDataByPath } from '../utils'
44
describe('Utils tests', () => {
55
describe('updatedNestedDataByPath', () => {
66
describe('array', () => {
7-
it('should update data correctly', async () => {
7+
it('should update data correctly', () => {
88
const oldData = ['one', 'two', 'three']
99

1010
const newData = updateNestedDataByPath(oldData, ['1'], 'new')
@@ -29,7 +29,7 @@ describe('Utils tests', () => {
2929
})
3030

3131
describe('object', () => {
32-
it('should update data correctly', async () => {
32+
it('should update data correctly', () => {
3333
const oldData = { title: 'Hello world', id: 1, createdAt: '2021-01-01' }
3434

3535
const newData = updateNestedDataByPath(
@@ -58,7 +58,7 @@ describe('Utils tests', () => {
5858
})
5959

6060
describe('set', () => {
61-
it('should update data correctly', async () => {
61+
it('should update data correctly', () => {
6262
const oldData = new Set([123, 321, 'hello', 'world'])
6363

6464
const newData = updateNestedDataByPath(oldData, ['2'], 'hi')
@@ -85,7 +85,7 @@ describe('Utils tests', () => {
8585
})
8686

8787
describe('map', () => {
88-
it('should update data correctly', async () => {
88+
it('should update data correctly', () => {
8989
const oldData = new Map([
9090
['en', 'hello'],
9191
['fr', 'bonjour'],
@@ -113,7 +113,7 @@ describe('Utils tests', () => {
113113
})
114114

115115
describe('nested data', () => {
116-
it('should update data correctly', async () => {
116+
it('should update data correctly', () => {
117117
/* eslint-disable cspell/spellchecker */
118118
const oldData = new Map([
119119
[
@@ -377,7 +377,7 @@ describe('Utils tests', () => {
377377
})
378378

379379
describe('deleteNestedDataByPath', () => {
380-
it('should delete item from array correctly', async () => {
380+
it('should delete item from array correctly', () => {
381381
const oldData = ['one', 'two', 'three']
382382

383383
const newData = deleteNestedDataByPath(oldData, ['1'])
@@ -399,7 +399,7 @@ describe('Utils tests', () => {
399399
`)
400400
})
401401

402-
it('should delete item from object correctly', async () => {
402+
it('should delete item from object correctly', () => {
403403
const oldData = { title: 'Hello world', id: 1, createdAt: '2021-01-01' }
404404

405405
const newData = deleteNestedDataByPath(oldData, ['createdAt'])
@@ -472,7 +472,7 @@ describe('Utils tests', () => {
472472
})
473473

474474
describe('nested data', () => {
475-
it('should delete nested items correctly', async () => {
475+
it('should delete nested items correctly', () => {
476476
/* eslint-disable cspell/spellchecker */
477477
const oldData = new Map([
478478
[

packages/query-persist-client-core/src/__tests__/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function createMockPersister(): Persister {
1717
let storedState: PersistedClient | undefined
1818

1919
return {
20-
async persistClient(persistClient: PersistedClient) {
20+
persistClient(persistClient: PersistedClient) {
2121
storedState = persistClient
2222
},
2323
async restoreClient() {

0 commit comments

Comments
 (0)