Fix SafeMath test file (#865)
This commit is contained in:
committed by
GitHub
parent
a6bef44790
commit
bd5f7f5774
@ -1,3 +1,9 @@
|
||||
module.exports = function (error) {
|
||||
assert.isAbove(error.message.search('invalid opcode'), -1, 'Invalid opcode error must be returned');
|
||||
export default async promise => {
|
||||
try {
|
||||
await promise;
|
||||
assert.fail('Expected invalid opcode not received');
|
||||
} catch (error) {
|
||||
const invalidOpcodeReceived = error.message.search('invalid opcode') >= 0;
|
||||
assert(invalidOpcodeReceived, `Expected "invalid opcode", got ${error} instead`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user