You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
527 B
15 lines
527 B
// timer for tests specific to testrpc
|
|
module.exports = s => {
|
|
return new Promise((resolve, reject) => {
|
|
web3.currentProvider.sendAsync({
|
|
jsonrpc: '2.0',
|
|
method: 'evm_increaseTime',
|
|
params: [s], // 60 seaconds, may need to be hex, I forget
|
|
id: new Date().getTime() // Id of the request; anything works, really
|
|
}, function(err) {
|
|
if (err) return reject(err);
|
|
resolve();
|
|
});
|
|
//setTimeout(() => resolve(), s * 1000 + 600) // 600ms breathing room for testrpc to sync
|
|
});
|
|
};
|
|
|