frangio / hardhat-exposed

Automatically expose internal Solidity functions for smart contract testing.
82 stars 13 forks source link

Testing private functions #35

Closed vittominacori closed 4 months ago

vittominacori commented 4 months ago

Is there any idea on how to test private functions as they can't be exposed?

Issue is covering 100% of the code without copying/mocking.

frangio commented 4 months ago

It's not possible without copying the code and making those functions internal, as far as I know. If there is some edge case you're not able to reach through internal or external functions, it's okay to leave that uncovered in my opinion.