Skip to content

Commit

Permalink
test: adapt for agent-js last version
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Jul 24, 2023
1 parent 616912b commit b451cda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nns/src/governance.canister.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ActorSubclass,
AnonymousIdentity,
polling,
SubmitResponse,
type Agent,
type RequestId,
} from "@dfinity/agent";
Expand Down Expand Up @@ -54,7 +55,7 @@ describe("GovernanceCanister", () => {
status: 13,
statusText: "good",
},
};
} as SubmitResponse;
const newSpawnNeuronId = new PbNeuronId();
newSpawnNeuronId.setId("1234");
const spawnResponse = new PbManageNeuronResponse.SpawnResponse();
Expand Down Expand Up @@ -1335,7 +1336,7 @@ describe("GovernanceCanister", () => {
status: 13,
statusText: "good",
},
};
} as SubmitResponse;
agent.call.mockResolvedValue(response);

const governance = GovernanceCanister.create({
Expand Down
1 change: 1 addition & 0 deletions packages/sns/src/sns.wrapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe("SnsWrapper", () => {

const mockIndexCanister = mock<IcrcIndexCanister>();
mockIndexCanister.getTransactions.mockResolvedValue({
balance: 2n,
transactions: [],
oldest_tx_id: [BigInt(2)],
});
Expand Down

0 comments on commit b451cda

Please sign in to comment.