-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌙 Add closeVessel fees tests #9
Conversation
|
||
const treasuryBalanceAfter = await debtToken.balanceOf(treasury) | ||
|
||
assert.isTrue(treasuryBalanceBefore.eq(treasuryBalanceAfter)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer us to use assert.equal(A, B), so the errors will be more descriptive and better than: True is not False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.equal matcher does not work on the BN type that they use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.equal(before.toString(), after.toString())
it('does not add fees mid epoch', async () => { | ||
const {erc20, debtToken, borrowerOperations} = contracts.core | ||
await openVessel(alice) | ||
await openVessel(bob) | ||
await skipToNextEpoch() | ||
|
||
await borrowerOperations.collectVesselFee(erc20.address, alice) | ||
|
||
const treasuryBalanceBefore = await debtToken.balanceOf(treasury) | ||
|
||
await mintDebtTokens(alice, vesselTotalDebt) | ||
await closeVessel(alice) | ||
|
||
const treasuryBalanceAfter = await debtToken.balanceOf(treasury) | ||
|
||
assert.equal(treasuryBalanceBefore.toString(), treasuryBalanceAfter.toString()) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will also pass after splitting treasury into treasury and distributor
No description provided.