From 943fdeb1163a03c492d1b3d9ec23fd0d7e989af2 Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Thu, 22 Dec 2022 23:29:17 +0100 Subject: [PATCH] fix the interop stuff --- .../server/interop/react/invalidateQueries.test.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/tests/server/interop/react/invalidateQueries.test.tsx b/packages/tests/server/interop/react/invalidateQueries.test.tsx index 4af01fc424d..0a0a23b774a 100644 --- a/packages/tests/server/interop/react/invalidateQueries.test.tsx +++ b/packages/tests/server/interop/react/invalidateQueries.test.tsx @@ -195,9 +195,12 @@ describe('invalidateQueries()', () => { utils.invalidateQueries(undefined, { predicate(opts) { const { queryKey } = opts; - const [path, input] = queryKey; + const [path, rest] = queryKey; - return path === 'count' && input === 'test'; + return ( + JSON.stringify(path) === '["count"]' && + (rest as any)?.input === 'test' + ); }, }); }} @@ -227,7 +230,7 @@ describe('invalidateQueries()', () => { 'invalidate-2-tuple', 'invalidate-3-exact', 'invalidate-4-all', - // 'invalidate-5-predicate', + 'invalidate-5-predicate', ]) { count++; // click button to invalidate