fix: fix tests

This commit is contained in:
Jonathan Rainville 2020-03-03 11:18:05 -05:00
parent 46b4b65b86
commit 262f220d89
No known key found for this signature in database
GPG Key ID: 5F4630B759727D9C
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/*global contract, config, it, assert, web3, before, describe, beforeEach, artifacts*/
/*global contract, config, assert, web3, artifacts, increaseTime, before*/
/* eslint no-await-in-loop: 0 */
const TestUtils = require("../utils/testUtils");
@ -102,7 +102,11 @@ contract("Escrow", function() {
// util
const expireTransaction = async() => {
const addTime = 5 * 86400;
await TestUtils.increaseTime(addTime + 1);
try {
await increaseTime(addTime + 1);
} catch (e) {
console.error('Error with the increase time', e);
}
};
let receipt, escrowId, escrowTokenId, _offerId, sntOfferId, ethOfferId, tokenOfferId, hash, signature, nonce;

View File

@ -140,8 +140,3 @@ exports.evmRevert = (id) => {
const params = [id];
return evmMethod("evm_revert", params);
};
exports.increaseTime = async (amount) => {
await evmMethod("evm_increaseTime", [Number(amount)]);
await evmMethod("evm_mine");
};