From 961d0a92f003f05cf1e29b8cf856f62a877fc02e Mon Sep 17 00:00:00 2001 From: Szymon Szlachtowicz <38212223+Szymx95@users.noreply.github.com> Date: Wed, 7 Jul 2021 10:30:19 +0200 Subject: [PATCH] Fix contract tests (#93) --- packages/contracts/test/1.mockContract.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts/test/1.mockContract.test.ts b/packages/contracts/test/1.mockContract.test.ts index af85431..e20f6a6 100644 --- a/packages/contracts/test/1.mockContract.test.ts +++ b/packages/contracts/test/1.mockContract.test.ts @@ -79,7 +79,7 @@ describe('Contract story', () => { const { signedMessages } = await getSignedMessages(alice, firstAddress, secondAddress) await contract.castVotes(signedMessages) - await provider.send('evm_mine', [Math.floor(Date.now() + 10000)]) + await provider.send('evm_mine', [Math.floor(Date.now() / 1000 + 10000)]) await contract.finalizeVotingRoom(1) expect((await contract.votingRoomMap(1)).slice(2)).to.deep.eq([ @@ -186,7 +186,7 @@ describe('Contract', () => { BigNumber.from(1), ]) - await provider.send('evm_mine', [Math.floor(Date.now() + 10000)]) + await provider.send('evm_mine', [Math.floor(Date.now() / 1000 + 10000)]) await contract.initializeVotingRoom(1, secondAddress.address) expect((await contract.getCommunityVoting(secondAddress.address)).slice(2)).to.deep.eq([ 1,