semaphore
semaphore copied to clipboard
Make the contract tests more atomic and use `loadFixture`
Description
It would be nice to make the tests as atomic as possible and use loadFixture.
This can help: https://github.com/semaphore-protocol/semaphore/blob/main/packages/cli-template-contracts-hardhat/test/Feedback.ts
Hi, I would like to take on this issue! :)
Hey @waddaboo yes, sure. Do you want me to assign you this issue?
Yes, please. Thanks!
@waddaboo done. Please, let us know if you have any questions.
Hi @vplasencia, I'm currently facing an issue at the Should not verify a proof if the Merkle tree root is expired test.
I have created a new group with 0-1s expiry with createGroup(address,uint256), and when I test it with verifyProof, it returns true instead of the Semaphore_MerkleTreeRootIsExpired error.
I have tried using setTimeOut to wait out the expiration and @nomicfoundation/hardhat-toolbox/network-helpers's time helpers to advance the block timestamp but still not getting the expected return.
Any ideas on how to work around this?
Edit: Nvm, found the error 😅