logoalt Hacker News

mulmboylast Sunday at 8:09 AM1 replyview on HN

What do these look like?


Replies

pmg101last Sunday at 11:14 AM

  1. Take every single function, even private ones.
  2. Mock every argument and collaborator.
  3. Call the function.
  4. Assert the mocks were  called in the expected way.
These tests help you find inadvertent changes, yes, but they also create constant noise about changes you intend.
show 3 replies