Description
When a solidity library is unit tested, it needs to be wrapped in a smart contract in order to be exposed for the js unit testing framework. The OpenZeppelin framework chose to call these wrapping contracts Mocks, e.g.
They are used in unit tests like this:
I think the name mock is quite confusing in this context. In traditional unit testing mocks are used to simulate behaviour of complex dependencies that the system under test (SUT) depends on.
Here we are calling the SUT itself a mock, which seems like an anti-pattern. The SUT should never be mocked, as it's the thing we are testing.
To avoid confusion, would it be acceptable to rename the contracts that are wrapping the libraries, e.g. instead of MathMock
something like MathProxy
, MathFacade
or MathWrapper
?