Skip to main content
Version: Next

mockServices.database

Home > @backstage/backend-test-utils > mockServices > database

Signature:

namespace database 

Functions

Function

Description

factory(options)

Creates a mock factory for the coreServices.database. Just returns the given knex instance if you supply one, which is useful in combination with the TestDatabases facility. Otherwise, it returns the regular default database factory which reads config settings.

mock(partialImpl)

Creates a mock of the coreServices.database, optionally with some given method implementations.