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,10 +1,12 @@
|
||||
const should = require('chai')
|
||||
.should();
|
||||
|
||||
async function assertJump (promise) {
|
||||
try {
|
||||
await promise;
|
||||
assert.fail('Expected invalid opcode not received');
|
||||
should.fail('Expected invalid opcode not received');
|
||||
} catch (error) {
|
||||
const invalidOpcodeReceived = error.message.search('invalid opcode') >= 0;
|
||||
assert(invalidOpcodeReceived, `Expected "invalid opcode", got ${error} instead`);
|
||||
error.message.should.include('invalid opcode', `Expected "invalid opcode", got ${error} instead`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user