Your unit tests pass, but your data still disappears
Mocked database tests verify your SQL syntax, not whether rows survive crashes, concurrent writes, or schema mismatches.
If you mock your database in tests, you are testing that your repository layer calls the right methods. You are not testing that data survives a crash, that a…