News for hackers. Stuff that matters.
Re:Netatwork/spy: Tiny proxy-based impl to mock and spy depe... by sayan51 on Saturday June 26, 2021 @05:52PM (#27646258)
In my projects things are arranged in terms of class, and dependencies are injected to constructor using dependency injection. Then the requirements of mocking the dependencies during unit tests bolis down to mocking parts or whole of the implementation as well as recording those method cqlls. The spy implementation is based on that philosophy and is therefore simple, straightforward and tiny.

There are no comments on this comment yet.