u don't unit-test a connection or you just unit-test the connection to a local socket which is more of an integration issue.
A unit-test should be the smallest possible set (atomic) with the minimum of external dependencies.
We can argue about the granularity based on the language.
In other words you want an integration test, also as soon as there 2 actors (app, db) it's already not really a unitest but an integration test.
Integration test means you have 2 parts that need to integrate with each other.
End to end test means you test for example the client -> app -> database -> app -> client.
So yes most of the people don't test the connection since you should get a runtime error anyways and it's the job of the db abstraction to unitest that