@magg
I do some direct hardcoding, some mocking with frameworks, and I've even experimented with short lived test containers with pg and a prepared database.
In Knex you can also direct it to a SQLite database when it's in the test env, but then you are limited to what SQLite can do and that might not be good if you use more advanced db queries in your app