Skip to content

Commit b039325

Browse files
Aniket-Enggcome-maiz
authored andcommitted
Fix/#1355 test helper to check balance difference (#1368)
* signing prefix added * Minor improvement * Tests changed * Successfully tested * Minor improvements * Minor improvements * Revert "Dangling commas are now required. (#1359)" This reverts commit a688977. * fixex #1355 * linting * suggested changes * Update BreakInvariantBounty.test.js (cherry picked from commit 6ae041b)
1 parent c25a1e3 commit b039325

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/helpers/balanceDiff.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
async function balanceDifference (account, promise) {
2+
const balanceBefore = web3.eth.getBalance(account);
3+
await promise();
4+
const balanceAfter = web3.eth.getBalance(account);
5+
return balanceAfter.minus(balanceBefore);
6+
}
7+
8+
module.exports = {
9+
balanceDifference,
10+
};

0 commit comments

Comments
 (0)