Skip to content

Comment on Is there such a thing as the NoMock movement?

Comments

Pointless example. There is no value in testing the method for success. However how it deals with failures/exceptions inside the dependencies might be worth testing.

Anyone with some amount of testing experience knows that testing isn't a silver bullet, and sometimes its not worth testing methods (straight getters and setters for example although there may be value there in a dynamic language).

As with many things, people jumped from one extreme of test/mock everything to test/mock nothing. The correct solution is usually somewhere in the middle.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.