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 { expectRevert } = require('openzeppelin-test-helpers');
const { expect } = require('chai');
const CountersImpl = artifacts.require('CountersImpl');
contract('Counters', function () {
@ -8,13 +10,13 @@ contract('Counters', function () {
});
it('starts at zero', async function () {
(await this.counter.current()).should.be.bignumber.equal('0');
expect(await this.counter.current()).to.be.bignumber.equal('0');
});
describe('increment', function () {
it('increments the current value by one', async function () {
await this.counter.increment();
(await this.counter.current()).should.be.bignumber.equal('1');
expect(await this.counter.current()).to.be.bignumber.equal('1');
});
it('can be called multiple times', async function () {
@ -22,19 +24,19 @@ contract('Counters', function () {
await this.counter.increment();
await this.counter.increment();
(await this.counter.current()).should.be.bignumber.equal('3');
expect(await this.counter.current()).to.be.bignumber.equal('3');
});
});
describe('decrement', function () {
beforeEach(async function () {
await this.counter.increment();
(await this.counter.current()).should.be.bignumber.equal('1');
expect(await this.counter.current()).to.be.bignumber.equal('1');
});
it('decrements the current value by one', async function () {
await this.counter.decrement();
(await this.counter.current()).should.be.bignumber.equal('0');
expect(await this.counter.current()).to.be.bignumber.equal('0');
});
it('reverts if the current value is 0', async function () {
@ -46,13 +48,13 @@ contract('Counters', function () {
await this.counter.increment();
await this.counter.increment();
(await this.counter.current()).should.be.bignumber.equal('3');
expect(await this.counter.current()).to.be.bignumber.equal('3');
await this.counter.decrement();
await this.counter.decrement();
await this.counter.decrement();
(await this.counter.current()).should.be.bignumber.equal('0');
expect(await this.counter.current()).to.be.bignumber.equal('0');
});
});
});