MockConfigApi
Home > @backstage/test-utils
> MockConfigApi
Warning: This API is now obsolete.
Use mockApis.config instead
MockConfigApi is a thin wrapper around ConfigReader that can be used to mock configuration using a plain object.
Signature:
class MockConfigApi implements ConfigApi
Implements: ConfigApi
Example
const mockConfig = new MockConfigApi({
app: { baseUrl: 'https://example.com' },
});
const rendered = await renderInTestApp(
<TestApiProvider apis={[[configApiRef, mockConfig]]}>
<MyTestedComponent />
</TestApiProvider>,
);
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Constructs a new instance of the |
Methods
Method |
Modifiers |
Description |
---|---|---|