From f818a047152c48bcbcfbf96fb384f7da1d903c10 Mon Sep 17 00:00:00 2001 From: Caspar Neumann Date: Mon, 13 Nov 2023 10:56:03 +0100 Subject: [PATCH] review comment: do not use deep imports --- apps/server/src/modules/h5p-editor/h5p-editor.module.ts | 2 ++ .../service/h5p-library-management.service.spec.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/server/src/modules/h5p-editor/h5p-editor.module.ts b/apps/server/src/modules/h5p-editor/h5p-editor.module.ts index c80ff8bd6c0..a9a9b105dfb 100644 --- a/apps/server/src/modules/h5p-editor/h5p-editor.module.ts +++ b/apps/server/src/modules/h5p-editor/h5p-editor.module.ts @@ -65,5 +65,7 @@ const providers = [ imports, controllers, providers, + exports: [ContentStorage, LibraryStorage], }) export class H5PEditorModule {} +export { LibraryStorage, ContentStorage, s3ConfigLibraries, s3ConfigContent }; diff --git a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts index 7862a23fbe4..5ff5b42ee1f 100644 --- a/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts +++ b/apps/server/src/modules/h5p-library-management/service/h5p-library-management.service.spec.ts @@ -1,11 +1,16 @@ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Test, TestingModule } from '@nestjs/testing'; import { DeepMocked, createMock } from '@golevelup/ts-jest'; -import { ContentStorage, LibraryStorage } from '@src/modules/h5p-editor/service'; +import { + ContentStorage, + LibraryStorage, + s3ConfigContent, + s3ConfigLibraries, +} from '@modules/h5p-editor/h5p-editor.module'; import { LibraryAdministration, ContentTypeCache } from '@lumieducation/h5p-server'; import { IHubContentType } from '@lumieducation/h5p-server/build/src/types'; -import { s3ConfigContent, s3ConfigLibraries } from '@src/modules/h5p-editor/h5p-editor.config'; import { H5PLibraryManagementService } from './h5p-library-management.service'; jest.mock('@lumieducation/h5p-server', () => {