Skip to content

Commit

Permalink
Fix mock type
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Jul 15, 2024
1 parent 6973ddf commit dfb4446
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/react-sdk/src/hooks/useCanMessage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,7 @@ describe("useCanMessage", () => {
}));
const canMessageStaticSpy = vi
.spyOn(Client, "canMessage")
.mockImplementation((peerAddress: string | string[]) =>
typeof peerAddress === "string"
? Promise.resolve([true])
: Promise.resolve(
Array.from({ length: peerAddress.length }).fill(
true,
) as boolean[],
),
);
.mockResolvedValue([true]);

const { result } = renderHook(() => useCanMessage());

Expand Down

0 comments on commit dfb4446

Please sign in to comment.