4 ms·
And that’s why you test the DB with an integration test (and likely a functional test too). For your unit test you’d just mock the dB call and make sure that f
by abritinthebay 9y ago
And that’s why you test the DB with an integration test (and likely a functional test too).
For your unit test you’d just mock the dB call and make sure that function called the “db” and returned the faux data. That’s it.
No one said unit tests had to be complex or test the whole stack. Quite the opposite actually.