Skip to main content
Version: Next

TestDatabases.init()

Home > @backstage/backend-test-utils > TestDatabases > init

Returns a fresh, unique, empty logical database on an instance of the given database ID platform.

Signature:

init(id: TestDatabaseId): Promise<Knex>;

Parameters

Parameter

Type

Description

id

TestDatabaseId

The ID of the database platform to use, e.g. 'POSTGRES_13'

**Returns:**

Promise<Knex>

A Knex connection object