DistributedCollective / DistributedCollective/Sovryn-smart-contracts
Refactor Hardhat tests
Open
@computerphysicslab is already working on this.
Since Sep 10, 2021.
low priority
maintenance
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
the tests are slow and can be improved dramatically
suggestions:
- snapshot repeating scenarios
https://ethereum-waffle.readthedocs.io/en/latest/fixtures.html - use mocks
https://ethereum-waffle.readthedocs.io/en/latest/mock-contract.html
added a task - beforeEach -> before
move repetitive beforeEach with redeployment to before whenever possible - when no need to real redeploy (or use p.1) - extract common deployment in tests into a shared functions
e.g. deployProtocol, deployLoanTokens, deployLiquidityMining and then just call these functions in before or beforeEach
Another idea: https://www.youtube.com/watch?v=vn3tm0quoqE
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.