Add HasNoEther
This commit is contained in:
12
test/helpers/expectThrow.js
Normal file
12
test/helpers/expectThrow.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default async promise => {
|
||||
try {
|
||||
await promise;
|
||||
} catch (error) {
|
||||
// TODO: Check jump destination to destinguish between a throw
|
||||
// and an actual invalid jump.
|
||||
const invalidJump = error.message.search('invalid JUMP') >= 0;
|
||||
assert(invalidJump, "Expected throw, got '" + error + "' instead");
|
||||
return;
|
||||
}
|
||||
assert.fail('Expected throw not received');
|
||||
};
|
||||
Reference in New Issue
Block a user