Remove Babel (#1074)
* Test helpers no longer rely on Babel. * Behaviours are no longer imported. * Removed Babel dependency. * Fixed linter errors.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
export function advanceBlock () {
|
||||
function advanceBlock () {
|
||||
return new Promise((resolve, reject) => {
|
||||
web3.currentProvider.sendAsync({
|
||||
jsonrpc: '2.0',
|
||||
@ -11,7 +11,7 @@ export function advanceBlock () {
|
||||
}
|
||||
|
||||
// Advances the block number so that the last mined block is `number`.
|
||||
export default async function advanceToBlock (number) {
|
||||
async function advanceToBlock (number) {
|
||||
if (web3.eth.blockNumber > number) {
|
||||
throw Error(`block number ${number} is in the past (current is ${web3.eth.blockNumber})`);
|
||||
}
|
||||
@ -20,3 +20,8 @@ export default async function advanceToBlock (number) {
|
||||
await advanceBlock();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
advanceBlock,
|
||||
advanceToBlock,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user