balanceDifference tests and application (#1514)
* Added balanceDifference tests. * Added balanceDifference tests. * Now using balanceDifference in all (most) tests. * Fixed typo.
This commit is contained in:
10
test/helpers/balanceDifference.js
Normal file
10
test/helpers/balanceDifference.js
Normal file
@ -0,0 +1,10 @@
|
||||
async function balanceDifference (account, promiseFunc) {
|
||||
const balanceBefore = web3.eth.getBalance(account);
|
||||
await promiseFunc();
|
||||
const balanceAfter = web3.eth.getBalance(account);
|
||||
return balanceAfter.minus(balanceBefore);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
balanceDifference,
|
||||
};
|
||||
Reference in New Issue
Block a user