mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openzeppelin-contracts/test/helpers/assertJump.js

10 lines
310 B

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`);
}
};