Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update revert message format. #56

Merged
merged 2 commits into from
Jul 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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