Skip to content

Commit

Permalink
fix rpc unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhsuresh committed Dec 20, 2024
1 parent 4123e39 commit 5b56ebd
Show file tree
Hide file tree
Showing 2 changed files with 13,540 additions and 11,167 deletions.
4 changes: 2 additions & 2 deletions packages/blitz-rpc/test/unit/react-query-utils.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe("invalidateQuery", () => {
expect(spyRefetchQueries).toBeCalledTimes(1)
const calledWith = spyRefetchQueries.mock.calls[0]![0] as any
// json of the queryKey is "a"
expect(calledWith[1].json).toEqual("a")
expect(calledWith.queryKey[1].json).toEqual("a")
})
})

Expand Down Expand Up @@ -90,7 +90,7 @@ describe("setQueryData", () => {
expect(spySetQueryData).toBeCalledTimes(1)

const invalidateCalledWith = spyRefetchQueries.mock.calls[0]![0] as any
expect(invalidateCalledWith[1].json).toEqual("params")
expect(invalidateCalledWith.queryKey[1].json).toEqual("params")

const calledWith = spySetQueryData.mock.calls[0] as Array<any>
expect(calledWith[0][1].json).toEqual("params")
Expand Down
Loading

0 comments on commit 5b56ebd

Please sign in to comment.