From 5226dbb48f1ee945f2af06716a8034ac8ea473b0 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 29 Apr 2024 10:42:37 +0200 Subject: [PATCH] chore: remove duplicated tests (#617) # Motivation I guess there was a merge conflicts at some point, I spotted two tests that were duplicated. # Changes - Remove duplicate suite `describe(balance)` in Index canister test. --- .../ledger-icrc/src/index-ng.canister.spec.ts | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/packages/ledger-icrc/src/index-ng.canister.spec.ts b/packages/ledger-icrc/src/index-ng.canister.spec.ts index 8a9b154ce..d0694ca73 100644 --- a/packages/ledger-icrc/src/index-ng.canister.spec.ts +++ b/packages/ledger-icrc/src/index-ng.canister.spec.ts @@ -132,43 +132,4 @@ describe("Index canister", () => { expect(res).toEqual(balance); }); }); - - describe("balance", () => { - it("should return the balance of main account", async () => { - const service = mock>(); - const balance = BigInt(100); - service.icrc1_balance_of.mockResolvedValue(balance); - - const canister = IcrcIndexNgCanister.create({ - canisterId: ledgerCanisterIdMock, - certifiedServiceOverride: service, - }); - - const owner = Principal.fromText("aaaaa-aa"); - const res = await canister.balance({ - owner, - }); - expect(service.icrc1_balance_of).toBeCalled(); - expect(res).toEqual(balance); - }); - - it("should return the balance of subaccount", async () => { - const service = mock>(); - const balance = BigInt(100); - service.icrc1_balance_of.mockResolvedValue(balance); - - const canister = IcrcIndexNgCanister.create({ - canisterId: ledgerCanisterIdMock, - certifiedServiceOverride: service, - }); - - const owner = Principal.fromText("aaaaa-aa"); - const subaccount = arrayOfNumberToUint8Array([0, 0, 1]); - const res = await canister.balance({ - owner, - subaccount, - }); - expect(res).toEqual(balance); - }); - }); });