Skip to content

Commit

Permalink
Update revert message format. (#56)
Browse files Browse the repository at this point in the history
This was changed in Parity 2.5:
openethereum/parity-ethereum#10519
  • Loading branch information
afck authored and phahulin committed Jul 24, 2019
1 parent e56b025 commit 853ef49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/0_staking.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const sendInStakingWindow = require('../utils/sendInStakingWindow');
const waitForValidatorSetChange = require('../utils/waitForValidatorSetChange');
const pp = require('../utils/prettyPrint');
const keythereum = require('keythereum');
const REVERT_EXCEPTION_MSG = 'Error: Node error: {"code":-32016,"message":"The execution failed due to an exception."}';
const REVERT_EXCEPTION_MSG = 'The execution failed due to an exception';
const waitForNextStakingEpoch = require('../utils/waitForNextStakingEpoch');

describe('Candidates place stakes on themselves', () => {
Expand Down Expand Up @@ -253,7 +253,7 @@ describe('Candidates place stakes on themselves', () => {
expect(false, `Tx didn't throw an exception: ${tx2.transactionHash}. Tx status: ${tx2.status}`).to.equal(true);
}
catch (e) {
expect(e && e.toString() == REVERT_EXCEPTION_MSG, `Tx threw an unexpected exception: ` + e.toString()).to.equal(true)
expect(e && e.toString().includes(REVERT_EXCEPTION_MSG), `Tx threw an unexpected exception: ` + e.toString()).to.equal(true)
}

console.log('**** Delegator can\'t move more staking tokens than one has');
Expand All @@ -267,7 +267,7 @@ describe('Candidates place stakes on themselves', () => {
expect(false, `Tx didn't throw an exception: ${tx3.transactionHash}. Tx status: ${tx3.status}`).to.equal(true);
}
catch (e) {
expect(e && e.toString() == REVERT_EXCEPTION_MSG, `Tx threw an unexpected exception: ` + e.toString()).to.equal(true)
expect(e && e.toString().includes(REVERT_EXCEPTION_MSG), `Tx threw an unexpected exception: ` + e.toString()).to.equal(true)
}
});

Expand Down

0 comments on commit 853ef49

Please sign in to comment.