useDatabase
hook.testServer
needs the project's AppModule
to be passed as an argument in order to build the Nest.js Application graph. From thereon you can build your test nest server any way you want to hooks and overriders.NationalRegistryApi
; and we're thus creating a mock:override
:sqlite
database in order to fully interact with the services:libs/testing/nest/src/lib/hooks
.@island.is/testing/fixtures
. The library contains many more that can benefit you in creating random test data. Please checkout libs/testing/fixtures
to view available fixtures.