Update and rename tests/README.md to foundry/README.md

This commit is contained in:
dr. mia von steinkirch, phd 2023-02-17 18:06:06 -08:00 committed by GitHub
parent f8caa39679
commit ab1111d9ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 35 deletions

30
foundry/README.md Normal file
View file

@ -0,0 +1,30 @@
## foundry and tests in solidity
<br>
### tl; dr
<br>
* foundry is a set of tools for ethereum applications development, including tests in solidity
<br>
---
### resources
<br>
* [how to mock solidity contracts](https://ethereum.org/en/developers/tutorials/how-to-mock-solidity-contracts-for-testing/)
* [truffle smart contract test framework](https://ethereum.org/en/developers/tutorials/how-to-mock-solidity-contracts-for-testing/)
* [in-depth guide to testing ethereum smart contracts](https://iamdefinitelyahuman.medium.com/an-in-depth-guide-to-testing-ethereum-smart-contracts-2e41b2770297)
* [how to test smart contracts](https://betterprogramming.pub/how-to-test-ethereum-smart-contracts-35abc8fa199d)
* [foundry book](https://book.getfoundry.sh/forge/differential-ffi-testing)

View file

@ -1,35 +0,0 @@
## tests in solidity
<br>
#### assert vs. require
* Assert() should only be used to test for internal errors, and to check invariants.
* Require() should be used to ensure valid conditions are met that cannot be detected until execution time.
* You may optionally provide a message for require, but not for assert.
<br>
#### unit testing
* [Solidity-Coverage](https://github.com/sc-forks/solidity-coverage)
* [Remix tests](https://github.com/ethereum/remix-project/tree/master/libs/remix-tests)
* [OpenZeppelin test helpers](https://github.com/OpenZeppelin/openzeppelin-test-helpers)
* [foundry forge tests](https://github.com/foundry-rs/foundry/tree/master/forge)
* [etheno](https://github.com/crytic/etheno)
<br>
---
### resources
<br>
* [how to mock solidity contracts](https://ethereum.org/en/developers/tutorials/how-to-mock-solidity-contracts-for-testing/)
* [truffle smart contract test framework](https://ethereum.org/en/developers/tutorials/how-to-mock-solidity-contracts-for-testing/)
* [in-depth guide to testing ethereum smart contracts](https://iamdefinitelyahuman.medium.com/an-in-depth-guide-to-testing-ethereum-smart-contracts-2e41b2770297)
* [how to test smart contracts](https://betterprogramming.pub/how-to-test-ethereum-smart-contracts-35abc8fa199d)