diff --git a/tests/unit-testing.md b/tests/unit-testing.md index 0654340..66b1ac8 100644 --- a/tests/unit-testing.md +++ b/tests/unit-testing.md @@ -1,8 +1,13 @@ -## basic Unit testing +## basic solidity unity test
-Functions in a test file to make testing more structural: +### functions + + +
+ +functions in a test file to make testing more structural: * `beforeEach()` - Runs before each test * `beforeAll()` - Runs before all tests @@ -11,7 +16,7 @@ Functions in a test file to make testing more structural:
-A generic unit testing file looks like: +a generic unit testing file looks like: ``` @@ -58,6 +63,19 @@ contract testSuite { } ``` -Note that ine can input custom values for `msg.sender` & `msg.value` of transaction using NatSpec comments. +note that ine can input custom values for `msg.sender` & `msg.value` of transaction using NatSpec comments. +
+ +--- + +### resources + +
+ +* [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)