3 ms·
This article seems to be implying that there's something special about DBs that makes them only testable directly instead of through mocks. There's a continuum
by elevatedastalt 2y ago
This article seems to be implying that there's something special about DBs that makes them only testable directly instead of through mocks.
There's a continuum between extreme integration testing and extreme unit testing, each with their strengths and weaknesses.
There's a reason we don't do all testing through integration testing: it's slower, more flaky, and cripples developer velocity to a near standstill.
There's a reason we don't do all testing through pure unit testing: you have no idea whether the e2e plumbing works as expected.
DBs aren't special in this regard. That being said, it is true that investing in a light weight unit-testable setup for your DB is a good idea.