Made it possible to construct mockServices.database with a given knex instance

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-11-05 11:35:31 +01:00
parent e115f24e81
commit 50648277ef
13 changed files with 119 additions and 124 deletions
@@ -224,10 +224,7 @@ your test database.
```ts
const { knex, subject } = await createSubject(databaseId);
const { server } = await startTestBackend({
features: [
myPlugin(),
mockServices.database.mock({ getClient: async () => knex }),
],
features: [myPlugin(), mockServices.database.factory({ knex })],
});
```