Replace chai.should with chai.expect (#1780)

* changed exxpect to expect wherever applicable

* Merged with latest branch

* Updated merkleTree helper to latest master branch

* Made linting fixes

* Fix for test build

* updated for Coverage

* Updated Address.test.js

* Undo package-lock changes.
This commit is contained in:
Yohann Pereira
2019-06-24 16:40:05 -04:00
committed by Francisco Giordano
parent 852e11c2db
commit 489d2e85f1
57 changed files with 564 additions and 453 deletions

View File

@ -1,5 +1,7 @@
const { BN } = require('openzeppelin-test-helpers');
const { expect } = require('chai');
const MathMock = artifacts.require('MathMock');
contract('Math', function () {
@ -12,21 +14,21 @@ contract('Math', function () {
describe('max', function () {
it('is correctly detected in first argument position', async function () {
(await this.math.max(max, min)).should.be.bignumber.equal(max);
expect(await this.math.max(max, min)).to.be.bignumber.equal(max);
});
it('is correctly detected in second argument position', async function () {
(await this.math.max(min, max)).should.be.bignumber.equal(max);
expect(await this.math.max(min, max)).to.be.bignumber.equal(max);
});
});
describe('min', function () {
it('is correctly detected in first argument position', async function () {
(await this.math.min(min, max)).should.be.bignumber.equal(min);
expect(await this.math.min(min, max)).to.be.bignumber.equal(min);
});
it('is correctly detected in second argument position', async function () {
(await this.math.min(max, min)).should.be.bignumber.equal(min);
expect(await this.math.min(max, min)).to.be.bignumber.equal(min);
});
});
@ -38,19 +40,19 @@ contract('Math', function () {
it('is correctly calculated with two odd numbers', async function () {
const a = new BN('57417');
const b = new BN('95431');
(await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b));
expect(await this.math.average(a, b)).to.be.bignumber.equal(bnAverage(a, b));
});
it('is correctly calculated with two even numbers', async function () {
const a = new BN('42304');
const b = new BN('84346');
(await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b));
expect(await this.math.average(a, b)).to.be.bignumber.equal(bnAverage(a, b));
});
it('is correctly calculated with one even and one odd number', async function () {
const a = new BN('57417');
const b = new BN('84346');
(await this.math.average(a, b)).should.be.bignumber.equal(bnAverage(a, b));
expect(await this.math.average(a, b)).to.be.bignumber.equal(bnAverage(a, b));
});
});
});