Skip to content

Commit a5319d5

Browse files
sukvvonmanudeli
andauthored
test(query-core/infiniteQueryObserver): remove duplicate 'InfiniteQueryObserver' and fix grammar in test names (#9332)
Co-authored-by: Jonghyeon Ko <manudeli.ko@gmail.com>
1 parent 1dd32ac commit a5319d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('InfiniteQueryObserver', () => {
2020
vi.useRealTimers()
2121
})
2222

23-
test('InfiniteQueryObserver should be able to fetch an infinite query with selector', async () => {
23+
test('should be able to fetch an infinite query with selector', async () => {
2424
const key = queryKey()
2525
const observer = new InfiniteQueryObserver(queryClient, {
2626
queryKey: key,
@@ -43,7 +43,7 @@ describe('InfiniteQueryObserver', () => {
4343
})
4444
})
4545

46-
test('InfiniteQueryObserver should pass the meta option to the queryFn', async () => {
46+
test('should pass the meta option to the queryFn', async () => {
4747
const meta = {
4848
it: 'works',
4949
}
@@ -73,7 +73,7 @@ describe('InfiniteQueryObserver', () => {
7373
expect(queryFn).toBeCalledWith(expect.objectContaining({ meta }))
7474
})
7575

76-
test('getNextPagParam and getPreviousPageParam should receive current pageParams', async () => {
76+
test('should make getNextPageParam and getPreviousPageParam receive current pageParams', async () => {
7777
const key = queryKey()
7878
let single: Array<string> = []
7979
let all: Array<string> = []
@@ -207,7 +207,7 @@ describe('InfiniteQueryObserver', () => {
207207
expect(observer.getCurrentResult().hasNextPage).toBe(false)
208208
})
209209

210-
test('getOptimisticResult should set infinite query behavior and return initial state', () => {
210+
test('should set infinite query behavior via getOptimisticResult and return the initial state', () => {
211211
const key = queryKey()
212212
const observer = new InfiniteQueryObserver(queryClient, {
213213
queryKey: key,

0 commit comments

Comments
 (0)