Include 'revert' in expectThrow() helper

This commit is contained in:
Alejandro Santander
2017-11-10 11:41:17 -03:00
parent 8e01dd14f9
commit 2413f83504
2 changed files with 12 additions and 11 deletions

View File

@ -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;