smartcontractkit / chainlink-automation-templates

Real-world sample projects using Chainlink Automation
https://automation.chainlink-demo.app
35 stars 14 forks source link

Use mocking library #24

Open imollov opened 2 years ago

imollov commented 2 years ago

ex: https://github.com/defi-wonderland/smock

petia-latinova commented 2 years ago

There are 2 problems to use defi-wonderland/smock for this project:

  1. Smock can't mock abstract contracts. The only non mock contract in this project is an abstract contract so it can't be mocked or tested directly.

  2. The functions which the mock contract implement and need to be mocked are internal. Smock doesn't support mocking internal functions yet. It's planned for the next release if they rise enough for future support of the project. The comment is from January 2022 but it's still not implemented.

https://twitter.com/0xGorillaDev/status/1478707671880634368

The internal function functionality is not implemented in the last dev version, so probably we can't expect it to be ready soon.