diff --git a/eth-contracts/test/DioneDispute.ts b/eth-contracts/test/DioneDispute.ts index b29c9fa..8fd6e60 100644 --- a/eth-contracts/test/DioneDispute.ts +++ b/eth-contracts/test/DioneDispute.ts @@ -40,7 +40,7 @@ describe("DioneDispute", function () { .to.emit(dioneDispute, 'NewVote') .withArgs(dhash, addr3.address); - await delay(2000); + await ethers.provider.send("evm_increaseTime", [2]); await expect(dioneDispute.finishDispute(dhash)) .to.emit(dioneDispute, 'DisputeFinished') @@ -58,8 +58,4 @@ describe("DioneDispute", function () { expect(await dioneStaking.minerStake(owner.address)) .to.equal(ethers.constants.WeiPerEther.mul(12000)); }); -}); - -function delay(ms: number): Promise { - return new Promise( resolve => setTimeout(resolve, ms) ); -} \ No newline at end of file +}); \ No newline at end of file