fix: fix tests
This commit is contained in:
parent
46b4b65b86
commit
262f220d89
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue