Skip to content

Commit cb260ad

Browse files
committed
Leaving example of non-viem mocha revert assertion
1 parent 35e104b commit cb260ad

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/RedeemPTokenTLOS.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ describe("RedeemPTokenTLOS", function () {
9696
const allowance = await ptokenTLOS.read.allowance([otherAccount.account.address, redeem.address]);
9797
expect(allowance).to.equal(halfAmount, "Allowance is incorrect");
9898

99+
//await expect(redeem.write.redeem([fullAmount], { account: otherAccount.account }))
100+
// .to.be.rejectedWith(/PToken TLOS transfer failed/);
99101
let failed = false;
100102
try {
101103
const redeemFailHash = await redeem.write.redeem([fullAmount]);
@@ -119,10 +121,6 @@ describe("RedeemPTokenTLOS", function () {
119121
expect(contractPtokenBalanceAfter).to.equal(halfAmount, "Contract ptoken balance is incorrect");
120122

121123
const ptokenBalanceAfter = await ptokenTLOS.read.balanceOf([otherAccount.account.address]);
122-
console.log("Full Amount:", fullAmount.toString());
123-
console.log("Half Amount:", halfAmount.toString());
124-
console.log("pToken Balance Before Redeem:", ptokenBalance.toString());
125-
console.log("pToken Balance After Redeem:", ptokenBalanceAfter.toString());
126124
expect(ptokenBalanceAfter).to.equal(halfAmount, "PToken balance is incorrect after successful redeem");
127125

128126
const oftBalanceAfter = await oftTLOS.read.balanceOf([otherAccount.account.address]);

0 commit comments

Comments
 (0)