deprecate MockFetchApi class, keep MockFetchApiOptions

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-05 13:56:51 +01:00
parent ec9665666a
commit 3b0c46e272
4 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -344,7 +344,7 @@ export interface MockFeatureFlagsApiOptions {
initialStates?: Record<string, FeatureFlagState>;
}
// @public
// @public @deprecated
export class MockFetchApi implements FetchApi {
constructor(options?: MockFetchApiOptions);
get fetch(): typeof fetch;
@@ -89,6 +89,7 @@ export interface MockFetchApiOptions {
* A test helper implementation of {@link @backstage/core-plugin-api#FetchApi}.
*
* @public
* @deprecated Use `mockApis.fetch()` instead.
*/
export class MockFetchApi implements FetchApi {
private readonly implementation: FetchApi;
@@ -66,6 +66,7 @@ export type { ErrorWithContext } from './ErrorApi/MockErrorApi';
/**
* @public
* @deprecated Use `mockApis.fetch()` instead.
*/
export type { MockFetchApi } from './FetchApi';