laconicd-deprecated/tests/solidity/suites/staking/patches/@aragon+contract-helpers-test+0.0.3.patch
Yijia Su 8bf8d34376
ci: update test scripts and actions (#657)
* Update test scripts and CI

* Update timeout

* Update test-helper

* fix issue for staking test

* fix bug in test helper

* reduce block time

* Update test cases

* use truffle 5.4.14 as global

* remove two checks

* reduce block time to 150ms

* fix patches paths

* Update test scripts

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-21 11:06:20 +00:00

23 lines
1.1 KiB
Diff

diff --git a/node_modules/@aragon/contract-helpers-test/assertThrow.js b/node_modules/@aragon/contract-helpers-test/assertThrow.js
index 5125356..88a8f63 100644
--- a/node_modules/@aragon/contract-helpers-test/assertThrow.js
+++ b/node_modules/@aragon/contract-helpers-test/assertThrow.js
@@ -1,5 +1,5 @@
const REVERT_CODE = 'revert'
-const THROW_ERROR_PREFIX = 'Returned error: VM Exception while processing transaction:'
+const THROW_ERROR_PREFIX = 'VM Exception while processing transaction:'
function assertError(error, expectedErrorCode) {
assert(error.message.search(expectedErrorCode) > -1, `Expected error code "${expectedErrorCode}" but failed with "${error}" instead.`)
@@ -41,7 +41,9 @@ module.exports = {
}
if (process.env.SOLIDITY_COVERAGE !== 'true' && reason) {
- assert.equal(error.reason, reason, `Expected revert reason "${reason}" but failed with "${error.reason || 'no reason'}" instead.`)
+ if (!error.reason.includes(reason)) {
+ assert.fail(`Expected revert reason includes "${reason}" but failed with "${error.reason || 'no reason'}" instead.`);
+ }
}
},
}