Skip to content

Commit

Permalink
fix the interop stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Dec 22, 2022
1 parent 88b8052 commit 943fdeb
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -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'
);
},
});
}}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 943fdeb

Please sign in to comment.