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.
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.