From 580040f96fbae562b90af74a33bc6209434207a3 Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Tue, 18 Jul 2023 17:24:16 +0200 Subject: [PATCH] Added missing unit test checks --- system-tests/test/deposit-redemption.test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/system-tests/test/deposit-redemption.test.ts b/system-tests/test/deposit-redemption.test.ts index 17cdb3bd0..2ccbc5735 100644 --- a/system-tests/test/deposit-redemption.test.ts +++ b/system-tests/test/deposit-redemption.test.ts @@ -65,7 +65,7 @@ describe("System Test - Deposit and redemption", () => { // subsequent Electrum retry attempts. const ELECTRUM_RETRY_BACKOFF_STEP_MS = 10000 // 10sec // Multiplier to convert satoshi to TBTC token units. - const SATOSHI_MULTIPLIER: BigNumber = BigNumber.from("10000000000") + const SATOSHI_MULTIPLIER = BigNumber.from(10000000000) let deposit: Deposit let depositUtxo: UnspentTransactionOutput @@ -547,7 +547,7 @@ describe("System Test - Deposit and redemption", () => { const expectedTbtcBalance = balanceInSatoshis.mul(SATOSHI_MULTIPLIER) - const actualBalance = tbtc.balanceOf( + const actualBalance = await tbtc.balanceOf( systemTestsContext.depositor.address ) @@ -593,6 +593,14 @@ describe("System Test - Deposit and redemption", () => { ) }) + it("should unmint depositor's TBTC tokens", async () => { + const tbtcBalance = await tbtc.balanceOf( + systemTestsContext.depositor.address + ) + + expect(tbtcBalance).to.be.equal(0) + }) + it("should transfer vault's bank balance to the Bridge", async () => { expect(await bank.balanceOf(vaultAddress)).to.be.equal(0)