backend-test-utils: explicit return type for mockServices.config()
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-test-utils': patch
|
||||
---
|
||||
|
||||
Added explicit return type signature for `mockServices.config()`.
|
||||
@@ -6,7 +6,6 @@
|
||||
import { Backend } from '@backstage/backend-app-api';
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { CacheService } from '@backstage/backend-plugin-api';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { ConfigService } from '@backstage/backend-plugin-api';
|
||||
import { DatabaseService } from '@backstage/backend-plugin-api';
|
||||
import { ExtendedHttpServer } from '@backstage/backend-app-api';
|
||||
@@ -37,7 +36,7 @@ export namespace mockServices {
|
||||
factory: () => ServiceFactory<CacheService>;
|
||||
}
|
||||
// (undocumented)
|
||||
export function config(options?: config.Options): ConfigReader;
|
||||
export function config(options?: config.Options): ConfigService;
|
||||
// (undocumented)
|
||||
export namespace config {
|
||||
// (undocumented)
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
ConfigService,
|
||||
coreServices,
|
||||
createServiceFactory,
|
||||
IdentityService,
|
||||
@@ -56,7 +57,7 @@ function simpleFactory<TService, TOptions extends [options?: object] = []>(
|
||||
* @alpha
|
||||
*/
|
||||
export namespace mockServices {
|
||||
export function config(options?: config.Options) {
|
||||
export function config(options?: config.Options): ConfigService {
|
||||
return new ConfigReader(options?.data, 'mock-config');
|
||||
}
|
||||
export namespace config {
|
||||
|
||||
Reference in New Issue
Block a user