diff --git a/packages/bridge/src/axelar/__tests__/axelar-transfer-status.spec.ts b/packages/bridge/src/axelar/__tests__/axelar-transfer-status.spec.ts index 23c98370a26..53f5af097be 100644 --- a/packages/bridge/src/axelar/__tests__/axelar-transfer-status.spec.ts +++ b/packages/bridge/src/axelar/__tests__/axelar-transfer-status.spec.ts @@ -6,17 +6,25 @@ import { BridgeEnvironment, TransferStatusReceiver } from "../../interface"; import { TransferStatus } from "../queries"; import { AxelarTransferStatusProvider } from "../transfer-status"; -jest.mock("@osmosis-labs/utils", () => ({ - poll: jest.fn(({ fn, validate }) => { - const pollFn = async () => { - const result = await fn(); - if (validate(result)) { - return result; - } - }; - return pollFn(); - }), -})); +jest.mock("@osmosis-labs/utils", () => { + const originalModule = jest.requireActual("@osmosis-labs/utils"); + return { + ...originalModule, + poll: jest.fn(({ fn, validate }) => { + const pollFn = async () => { + const result = await fn(); + if (validate(result)) { + return result; + } + }; + return pollFn(); + }), + }; +}); + +afterEach(() => { + jest.clearAllMocks(); +}); describe("AxelarTransferStatusProvider", () => { let provider: AxelarTransferStatusProvider; @@ -29,10 +37,6 @@ describe("AxelarTransferStatusProvider", () => { provider.statusReceiverDelegate = mockReceiver; }); - afterEach(() => { - jest.clearAllMocks(); - }); - it("should initialize with correct URLs", () => { expect(provider.axelarScanBaseUrl).toBe("https://axelarscan.io"); expect(provider.axelarApiBaseUrl).toBe("https://api.axelarscan.io");