Hacker News new | ask | show | jobs
by 9rx 173 days ago
If your SQL is isolated to one place then you only need to test that single package with a real DB and can use mocks everywhere else. Your mocks can be tested with the exact same test suite as the SQL package, so you know it conforms to the same contract.

If you have SQL scattered all over the place... Leave the spaghetti for dinner.