backend-test-utils: remove callback form features from startTestBackend

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-07-12 10:49:44 +02:00
parent 906c817fd3
commit 972bcbb57a
3 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/backend-test-utils': patch
---
Updated `ServiceFactoryTester` to only accept plain service factory objects, no longer supporting the callback form. This lines up with the changes to `@backstage/backend-plugin-api` and should not require any code changes.
Updated `startTestBackend` and `ServiceFactoryTester` to only accept plain service factory or backend feature objects, no longer supporting the callback form. This lines up with the changes to `@backstage/backend-plugin-api` and should not require any code changes.
+1 -2
View File
@@ -430,9 +430,8 @@ export interface TestBackendOptions<TExtensionPoints extends any[]> {
// (undocumented)
features?: Array<
| BackendFeature
| (() => BackendFeature)
| Promise<{
default: BackendFeature | (() => BackendFeature);
default: BackendFeature;
}>
>;
}
@@ -48,11 +48,7 @@ export interface TestBackendOptions<TExtensionPoints extends any[]> {
];
},
];
features?: Array<
| BackendFeature
| (() => BackendFeature)
| Promise<{ default: BackendFeature | (() => BackendFeature) }>
>;
features?: Array<BackendFeature | Promise<{ default: BackendFeature }>>;
}
/** @public */