Skip to content

Commit

Permalink
fix: initCoreSDK isn't a mockable fn
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglonghong committed Jul 10, 2024
1 parent 9caf625 commit d482937
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/agents/chain-abstraction/test/libs/shared/quote.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d482937

Please sign in to comment.