We do both at work (~300k sloc, >70% unit test coverage).
There are unit tests with mocks on repository calls, and integration testing with a fresh pg database bootstraped with docker and .sql seeds.
One is fast to code, one gives more realistic feedbacks on real life execution. Both solve issues.
This is not the end of the game tho, as performance and back pressure issues arises whith a successful project... Testing is a long and interesting process.
Mocking out a repository is IMO a lot less bad than mocking out an actual database connection. That's probably one of the biggest arguments in favor of the repository pattern: the ability to replace the repository with a test double of some kind.
There are unit tests with mocks on repository calls, and integration testing with a fresh pg database bootstraped with docker and .sql seeds.
One is fast to code, one gives more realistic feedbacks on real life execution. Both solve issues.
This is not the end of the game tho, as performance and back pressure issues arises whith a successful project... Testing is a long and interesting process.