Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by torginus

8 days ago

There's a saying that since nobody tests the tests, they must be trivially correct.

That's why they came up with the Arrange-Act-Assert pattern.

My favorite kind of unit test nowadays is when you store known input-output pairs and validate the code on them. It's easy to test corner cases and see that the output works as desired.

1 comment

torginus

Reply

01HNNWZ0MV43FF  8 days ago

"Golden snapshot testing"

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities