Comment

Comment by matteodt

Interesting bit about sane logic. Is it something you verify manually by reading the pull request code? Or do you rather expect automated tests that use something like spies to check when a control structure is called?

In my coding life, I had a period where I was super into test driven development with mocks and I believe I was doing something very similar to what you called sane logic check. However, I later dropped this approach in favor of heavily parametrized tests where checks happen only on the output of functions and on side effects when necessary (e.g. an email is sent or a row is updated in the database).

Note: I am using this Martin Fowler's definition for "spies": https://martinfowler.com/bliki/TestDouble.html

parent matteodt 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton