MockConfigApi is a thin wrapper around @backstage/config#ConfigReader that can be used to mock configuration using a plain object.
Use mockApis.(config:namespace) instead
const mockConfig = new MockConfigApi({ app: { baseUrl: 'https://example.com' },});const rendered = await renderInTestApp( <TestApiProvider apis={[[configApiRef, mockConfig]]}> <MyTestedComponent /> </TestApiProvider>,); Copy
const mockConfig = new MockConfigApi({ app: { baseUrl: 'https://example.com' },});const rendered = await renderInTestApp( <TestApiProvider apis={[[configApiRef, mockConfig]]}> <MyTestedComponent /> </TestApiProvider>,);
Optional
MockConfigApi is a thin wrapper around @backstage/config#ConfigReader that can be used to mock configuration using a plain object.
Deprecated
Use mockApis.(config:namespace) instead
Example