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:
Nicolás Venturo
2018-08-10 19:03:04 -03:00
committed by Francisco Giordano
parent a2e7103869
commit ac91af9a6a
41 changed files with 396 additions and 297 deletions

View File

@ -1,12 +1,14 @@
const should = require('chai')
.should();
async function assertRevert (promise) {
try {
await promise;
} catch (error) {
const revertFound = error.message.search('revert') >= 0;
assert(revertFound, `Expected "revert", got ${error} instead`);
error.message.should.include('revert', `Expected "revert", got ${error} instead`);
return;
}
assert.fail('Expected revert not received');
should.fail('Expected revert not received');
}
module.exports = {