Files
openzeppelin-contracts/test/helpers/assertJump.js
Nicolás Venturo ac91af9a6a 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
2018-08-10 19:03:04 -03:00

16 lines
333 B
JavaScript

const should = require('chai')
.should();
async function assertJump (promise) {
try {
await promise;
should.fail('Expected invalid opcode not received');
} catch (error) {
error.message.should.include('invalid opcode', `Expected "invalid opcode", got ${error} instead`);
}
}
module.exports = {
assertJump,
};