Promisify web3 sync requests in tests (#1009)
This commit is contained in:
7
test/helpers/web3.js
Normal file
7
test/helpers/web3.js
Normal file
@ -0,0 +1,7 @@
|
||||
const pify = require('pify');
|
||||
|
||||
const ethAsync = pify(web3.eth);
|
||||
|
||||
export const ethGetBalance = ethAsync.getBalance;
|
||||
export const ethSendTransaction = ethAsync.sendTransaction;
|
||||
export const ethGetBlock = ethAsync.getBlock;
|
||||
Reference in New Issue
Block a user