Skip to content

Commit

Permalink
✅ server: prevent expected error output
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Oct 31, 2024
1 parent b95affa commit 8e7ff15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/test/hooks/activity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import deriveAddress from "../../utils/deriveAddress";
import keeper from "../../utils/keeper";
import publicClient from "../../utils/publicClient";
import anvilClient from "../anvilClient";
import type { time } from "node:console";

const appClient = testClient(app);

Expand Down Expand Up @@ -111,6 +112,7 @@ describe("address activity", () => {

it("fails with unexpected error", async () => {
const captureException = vi.spyOn(sentry, "captureException");
captureException.mockImplementationOnce(() => "");

vi.spyOn(publicClient, "getCode").mockRejectedValue(new Error("Unexpected"));

Expand Down Expand Up @@ -138,6 +140,7 @@ describe("address activity", () => {

it("fails with transaction timeout", async () => {
const captureException = vi.spyOn(sentry, "captureException");
captureException.mockImplementation(() => "");

vi.spyOn(publicClient, "waitForTransactionReceipt").mockRejectedValue(new Error("Transaction Timeout"));

Expand Down

0 comments on commit 8e7ff15

Please sign in to comment.