Commit 2413f835 by Alejandro Santander

Include 'revert' in expectThrow() helper

parent 8e01dd14
{ {
"name": "zeppelin-solidity", "name": "zeppelin-solidity",
"version": "1.2.0", "version": "1.3.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
...@@ -5084,15 +5084,6 @@ ...@@ -5084,15 +5084,6 @@
"xtend": "4.0.1" "xtend": "4.0.1"
} }
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
...@@ -5115,6 +5106,15 @@ ...@@ -5115,6 +5106,15 @@
"function-bind": "1.1.0" "function-bind": "1.1.0"
} }
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
......
...@@ -10,8 +10,9 @@ export default async promise => { ...@@ -10,8 +10,9 @@ export default async promise => {
// we distinguish this from an actual out of gas event? (The // we distinguish this from an actual out of gas event? (The
// testrpc log actually show an 'invalid jump' event.) // testrpc log actually show an 'invalid jump' event.)
const outOfGas = error.message.search('out of gas') >= 0; const outOfGas = error.message.search('out of gas') >= 0;
const revert = error.message.search('revert') >= 0;
assert( assert(
invalidOpcode || outOfGas, invalidOpcode || outOfGas || revert,
"Expected throw, got '" + error + "' instead", "Expected throw, got '" + error + "' instead",
); );
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment