Rich reverts in tests plus readability

This commit is contained in:
Greg Hysen
2019-09-04 00:17:12 -07:00
parent 293c428186
commit 4bc84cd526
6 changed files with 37 additions and 32 deletions

View File

@@ -62,10 +62,14 @@ export class FinalizerActor extends BaseActor {
await this._stakingWrapper.skipToNextEpochAsync();
// assert reward vault changes
const finalRewardVaultBalanceByPoolId = await this._getRewardVaultBalanceByPoolIdAsync(this._poolIds);
expect(finalRewardVaultBalanceByPoolId).to.be.deep.equal(expectedRewardVaultBalanceByPoolId);
expect(finalRewardVaultBalanceByPoolId, 'final pool balances in reward vault').to.be.deep.equal(
expectedRewardVaultBalanceByPoolId,
);
// assert member balances
const finalMemberBalancesByPoolId = await this._getMemberBalancesByPoolIdAsync(this._membersByPoolId);
expect(finalMemberBalancesByPoolId).to.be.deep.equal(expectedMemberBalancesByPoolId);
expect(finalMemberBalancesByPoolId, 'final delegator balances in reward vault').to.be.deep.equal(
expectedMemberBalancesByPoolId,
);
}
private async _computeExpectedMemberBalancesByPoolIdAsync(