Skip to main content

@backstage/frontend-test-utils

Home > @backstage/frontend-test-utils

Contains utilities that can be used when testing frontend features such as extensions.

Classes

Class

Description

ExtensionQuery

ExtensionTester

MockAnalyticsApi

Mock implementation of AnalyticsApi with helpers to ensure that events are sent correctly. Use getEvents in tests to verify captured events.

Functions

Function

Description

createExtensionTester(subject, options)

renderInTestApp(element, options)

Renders the given element in a test app, for use in unit tests.

renderTestApp(options)

Renders the provided extensions inside a Backstage app, returning the same utilities as @testing-library/react render function.

Type Aliases

Type Alias

Description

RenderTestAppOptions

Options for renderTestApp.

TestAppOptions

Options to customize the behavior of the test app.