backend-plugin-api: properly forward lack of feature options

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-09-02 16:51:56 +02:00
parent b9d94774fd
commit 91eed37a39
9 changed files with 55 additions and 9 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ export type CatalogPermissionRule<TParams extends unknown[] = unknown[]> =
PermissionRule<Entity, EntitiesSearchFilter, 'catalog-entity', TParams>;
// @alpha
export const catalogPlugin: (options?: unknown) => BackendFeature;
export const catalogPlugin: (options?: undefined) => BackendFeature;
// @public (undocumented)
export interface CatalogProcessingEngine {
@@ -53,7 +53,7 @@ describe('catalogServiceRef', () => {
await startTestBackend({
services: [mockDiscoveryFactory],
features: [testModule({})],
features: [testModule()],
});
});
});
+1 -1
View File
@@ -556,7 +556,7 @@ export type RunCommandOptions = {
};
// @alpha
export const scaffolderCatalogModule: (options?: unknown) => BackendFeature;
export const scaffolderCatalogModule: (options?: undefined) => BackendFeature;
// @public (undocumented)
export class ScaffolderEntitiesProcessor implements CatalogProcessor {
@@ -24,7 +24,7 @@ describe('ScaffolderCatalogModule', () => {
const extensionPoint = { addProcessor: jest.fn() };
await startTestBackend({
extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]],
features: [scaffolderCatalogModule({})],
features: [scaffolderCatalogModule()],
});
expect(extensionPoint.addProcessor).toHaveBeenCalledWith(