From d482937db7b2448e24ce42f9f56b3fffe147a21f Mon Sep 17 00:00:00 2001 From: wanglonghong Date: Wed, 10 Jul 2024 09:34:58 +0800 Subject: [PATCH] fix: initCoreSDK isn't a mockable fn --- .../chain-abstraction/test/libs/shared/quote.spec.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/agents/chain-abstraction/test/libs/shared/quote.spec.ts b/packages/agents/chain-abstraction/test/libs/shared/quote.spec.ts index 0baaf5a64b..57a1e146cd 100644 --- a/packages/agents/chain-abstraction/test/libs/shared/quote.spec.ts +++ b/packages/agents/chain-abstraction/test/libs/shared/quote.spec.ts @@ -167,8 +167,14 @@ describe("Libs:quote", () => { }); axiosGetStub.resolves({ data: { toAmount: "990000000000000" } }); let initCoreSDKStub: SinonStub; - initCoreSDKStub = stub(MockableFns, "initCoreSDK"); - initCoreSDKStub.resolves({ sdkBase: { calculateAmountReceived: { amountReceived: "100" } } }); + initCoreSDKStub = stub(HelperFns, "initCoreSDK"); + initCoreSDKStub.resolves({ + sdkBase: { + calculateAmountReceived: () => { + return { amountReceived: "100" }; + }, + }, + }); stub(HelperFns, "DestinationSwapperPerDomain").value({ "1886350457": { type: Swapper.UniV3,