From d2b9c1248c47f63d41bb0b2feb2e66092efe3fcd Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Mon, 16 Jun 2025 16:00:53 +0100 Subject: [PATCH] fix(api): apply feedback + enhance typing --- api/src/utils/test/utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/src/utils/test/utils.ts b/api/src/utils/test/utils.ts index 4dcc13a1..50b77a2e 100644 --- a/api/src/utils/test/utils.ts +++ b/api/src/utils/test/utils.ts @@ -36,11 +36,10 @@ type buildTestingMocksProps< | { providers: NonNullable

; controllers: NonNullable; - autoInjectFrom?: 'all'[]; + autoInjectFrom: 'all'[]; } | { providers: NonNullable

; - controllers?: undefined; autoInjectFrom?: 'providers'[]; } | { @@ -188,7 +187,7 @@ export const buildTestingMocks = async ({ ? [ MongooseModule.forFeature([ ...getModels(models), - ...(!!autoInjectFrom + ...(autoInjectFrom ? getNestedModels(nestedProviders, 'Repository') : []), ]),