a quick question in regarding coverage:
what Branch stands for? my understand is in regarding the if statement but i am unsure what to do
Feb 2, 2023, 6:51 PM
If,else,requires, anything have a code block
If you have a require, you need to write test to pass and get it
did this one month ago and i can clearly say it's annoying af 😆
but you get more trust on your code
but you get more trust on your code
usually, 100% is not needed, better write proper unit, fuzz and integration tests
Feb 2, 2023, 7:58 PM
What's the UI?
Feb 2, 2023, 8:17 PM
https://github.com/sc-forks/solidity-coverage/blob/master/HARDHAT_README.md
npx hardhat coverage
runs all the tests in your /test folder and generate a cool index.html with all the code coverage
runs all the tests in your /test folder and generate a cool index.html with all the code coverage
Feb 2, 2023, 8:23 PM
Grazie
Feb 2, 2023, 8:28 PM
that looks nice
works very nicely tbh
in that case i should test also the require right?
Feb 2, 2023, 8:42 PM
yep
await expect(contract.function())to.be.revertedWith("revert text")
Feb 2, 2023, 8:44 PM