Include 'revert' in expectThrow() helper
This commit is contained in:
@ -10,8 +10,9 @@ export default async promise => {
|
||||
// we distinguish this from an actual out of gas event? (The
|
||||
// testrpc log actually show an 'invalid jump' event.)
|
||||
const outOfGas = error.message.search('out of gas') >= 0;
|
||||
const revert = error.message.search('revert') >= 0;
|
||||
assert(
|
||||
invalidOpcode || outOfGas,
|
||||
invalidOpcode || outOfGas || revert,
|
||||
"Expected throw, got '" + error + "' instead",
|
||||
);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user