We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f7510d commit 889d871Copy full SHA for 889d871
packages/query-core/src/__tests__/utils.test.tsx
@@ -4,6 +4,7 @@ import {
4
addToStart,
5
isPlainArray,
6
isPlainObject,
7
+ keepPreviousData,
8
matchMutation,
9
partialMatchKey,
10
replaceEqualDeep,
@@ -405,6 +406,13 @@ describe('core/utils', () => {
405
406
})
407
408
409
+ describe('keepPreviousData', () => {
410
+ it('should return the parameter as is', () => {
411
+ const x = { a: 1, b: 2 }
412
+ expect(keepPreviousData(x)).toEqual(x)
413
+ })
414
415
+
416
describe('addToEnd', () => {
417
it('should add item to the end of the array', () => {
418
const items = [1, 2, 3]
0 commit comments