Testing that a controller queued something by starting a worker and waiting is slow and flaky; testing it by reading the queue table couples the test to the…
Resetting the database between tests by truncating every table costs a statement per table per test, which on forty tables and four hundred tests is sixteen thousand statements.…
A repository test against a mocked connection asserts that the code calls the methods you expected, which is a restatement of the code rather than a check on…
Mocking an upstream service makes the suite fast and guarantees nothing about the upstream still behaving that way. A contract test is a small suite that runs against…