Skip to content

Commit 0cdfdea

Browse files
authored
test(query-core/utils,vue-query/mutationOptions): assert reference identity with 'toBe' (#11048)
1 parent 7bc3415 commit 0cdfdea

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ describe('core/utils', () => {
463463
describe('keepPreviousData', () => {
464464
it('should return the parameter as is', () => {
465465
const x = { a: 1, b: 2 }
466-
expect(keepPreviousData(x)).toEqual(x)
466+
expect(keepPreviousData(x)).toBe(x)
467467
})
468468
})
469469

packages/vue-query/src/__tests__/mutationOptions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ describe('mutationOptions', () => {
2424
mutationFn: () => sleep(10).then(() => 5),
2525
} as const
2626

27-
expect(mutationOptions(object)).toStrictEqual(object)
27+
expect(mutationOptions(object)).toBe(object)
2828
})
2929

3030
it('should return the object received as a parameter without any modification (without mutationKey in mutationOptions)', () => {
3131
const object = {
3232
mutationFn: () => sleep(10).then(() => 5),
3333
} as const
3434

35-
expect(mutationOptions(object)).toStrictEqual(object)
35+
expect(mutationOptions(object)).toBe(object)
3636
})
3737

3838
it('should return the getter received as a parameter without any modification (with mutationKey in mutationOptions)', () => {

0 commit comments

Comments
 (0)