Skip to content

Commit

Permalink
Added missing unit test checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Jul 18, 2023
1 parent f7c7534 commit f81d29f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions system-tests/test/deposit-redemption.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions system-tests/test/minting-unminting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f81d29f

Please sign in to comment.