Replace all asserts with chai.should (#1183)
* Moving towards chai.should. * Fixed failing tests. * Fixed linter errors. * Revert package-lock.json changes. * Fixed failing tests. * s/eq/equal * Addressed review comment
This commit is contained in:
committed by
Francisco Giordano
parent
a2e7103869
commit
ac91af9a6a
@ -1,18 +1,22 @@
|
||||
const { expectThrow } = require('../../helpers/expectThrow');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
|
||||
require('chai')
|
||||
.use(require('chai-bignumber')(BigNumber))
|
||||
.should();
|
||||
|
||||
function shouldBehaveLikeCappedToken (minter, [anyone], cap) {
|
||||
describe('capped token', function () {
|
||||
const from = minter;
|
||||
|
||||
it('should start with the correct cap', async function () {
|
||||
const _cap = await this.token.cap();
|
||||
|
||||
assert(cap.eq(_cap));
|
||||
(await this.token.cap()).should.be.bignumber.equal(cap);
|
||||
});
|
||||
|
||||
it('should mint when amount is less than cap', async function () {
|
||||
const result = await this.token.mint(anyone, cap.sub(1), { from });
|
||||
assert.equal(result.logs[0].event, 'Mint');
|
||||
result.logs[0].event.should.equal('Mint');
|
||||
});
|
||||
|
||||
it('should fail to mint if the ammount exceeds the cap', async function () {
|
||||
|
||||
Reference in New Issue
Block a user