Skip to content

Commit

Permalink
docs: gitignore smock directory
Browse files Browse the repository at this point in the history
  • Loading branch information
0xJabberwock committed Dec 26, 2023
1 parent 3241665 commit 8212880
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Option | Default | Notes
`mocks ` | `./solidity/test/smock` | The path to the generated mock contracts
`ignore` | [] | A list of directories to ignore, e.g. `--ignore libraries`

Be sure to `gitignore` the generated smock directory.

### Using mocks

Let's say you have a `Greeter` contract in your project at `contracts/Greeter.sol`:
Expand Down Expand Up @@ -109,7 +111,7 @@ greeter.set__greeting('Hola');
### Gotchas

- Please, note that if you want to mock `internal` functions, you **must** make them `virtual`. The tool will not generate mocks for internal functions that are not virtual.
- Cannot `set` private variables and mock private functions.
- Cannot set `private` variables and mock `private` functions.
- Mocking of structs containing mappings is not supported.

# Licensing
Expand Down

0 comments on commit 8212880

Please sign in to comment.