chore: fix some of the tests by exporting the mockConfigFactory

Signed-off-by: blam <ben@blam.sh>

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2023-01-11 14:06:45 +01:00
parent 5541715237
commit 54632b8304
5 changed files with 33 additions and 29 deletions
+11
View File
@@ -5,8 +5,10 @@
```ts
import { Backend } from '@backstage/backend-app-api';
import { BackendFeature } from '@backstage/backend-plugin-api';
import { ConfigService } from '@backstage/backend-plugin-api';
import { ExtendedHttpServer } from '@backstage/backend-app-api';
import { ExtensionPoint } from '@backstage/backend-plugin-api';
import { JsonObject } from '@backstage/types';
import { Knex } from 'knex';
import { ServiceFactory } from '@backstage/backend-plugin-api';
import { ServiceRef } from '@backstage/backend-plugin-api';
@@ -14,6 +16,15 @@ import { ServiceRef } from '@backstage/backend-plugin-api';
// @public (undocumented)
export function isDockerDisabledForTests(): boolean;
// @public (undocumented)
export const mockConfigFactory: (
options?:
| {
data?: JsonObject | undefined;
}
| undefined,
) => ServiceFactory<ConfigService>;
// @public
export function setupRequestMockHandlers(worker: {
listen: (t: any) => void;
@@ -13,5 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { mockTokenManagerFactory } from './mockTokenManagerService';
export { mockConfigFactory } from './mockConfigService';
@@ -15,3 +15,4 @@
*/
export * from './wiring';
export * from './implementations';
@@ -42,7 +42,8 @@ import {
coreServices,
} from '@backstage/backend-plugin-api';
import { mockConfigFactory, mockTokenManagerFactory } from '../implementations';
import { mockConfigFactory } from '../implementations/mockConfigService';
import { mockTokenManagerFactory } from '../implementations/mockTokenManagerService';
import { ConfigReader } from '@backstage/config';
import express from 'express';