From f81d29f01c22dc2180371a74c5a63827fa7c452b 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 ++++++++++-- system-tests/test/minting-unminting.test.ts | 1 + 2 files changed, 11 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) diff --git a/system-tests/test/minting-unminting.test.ts b/system-tests/test/minting-unminting.test.ts index 3328fda52..968a96eec 100644 --- a/system-tests/test/minting-unminting.test.ts +++ b/system-tests/test/minting-unminting.test.ts @@ -49,6 +49,7 @@ const satoshiMultiplier = 1e10 * - A fresh live wallet (with no main UTXO yet) must be registered in * the bridge */ + describe("System Test - Minting and unminting", () => { let systemTestsContext: SystemTestsContext let electrumClient: ElectrumClient