@backstage/backend-test-utils
Home > @backstage/backend-test-utils
Test helpers library for Backstage backends
Classes
Class | Description |
---|---|
ServiceFactoryTester | A utility to help test service factories in isolation. |
TestDatabases | Encapsulates the creation of ephemeral test database instances for use inside unit or integration tests. |
Functions
Function | Description |
---|---|
createMockDirectory(options) | Creates a new temporary mock directory that will be removed after the tests have completed. |
isDockerDisabledForTests() | |
setupRequestMockHandlers(worker) | Sets up handlers for request mocking |
startTestBackend(options) |
Interfaces
Interface | Description |
---|---|
MockDirectory | A utility for creating a mock directory that is automatically cleaned up. |
MockDirectoryContentCallbackContext | A context that allows for more advanced file system operations when writing mock directory content. |
MockDirectoryContentOptions | Options for MockDirectory.content(). |
MockDirectoryOptions | Options for createMockDirectory(). |
ServiceFactoryTesterOptions | Options for ServiceFactoryTester. |
TestBackend | |
TestBackendOptions |
Namespaces
Namespace | Description |
---|---|
mockCredentials | |
mockServices |
Type Aliases
Type Alias | Description |
---|---|
MockDirectoryContent | The content of a mock directory represented by a nested object structure. |
MockDirectoryContentCallback | A callback that allows for more advanced file system operations when writing mock directory content. |
ServiceMock | |
TestDatabaseId | The possible databases to test against. |