diff --git a/backend/jest.tsconfig.json b/backend/jest.tsconfig.json new file mode 100644 index 000000000..19ff87bd2 --- /dev/null +++ b/backend/jest.tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "isolatedModules": true + }, + "include": ["src/**/*.ts", "test/**/*.ts"] +} \ No newline at end of file diff --git a/backend/jest.tsconfig.json.license b/backend/jest.tsconfig.json.license new file mode 100644 index 000000000..bbe7d178d --- /dev/null +++ b/backend/jest.tsconfig.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2026 The HedgeDoc developers (see AUTHORS file) + +SPDX-License-Identifier: CC0-1.0 \ No newline at end of file diff --git a/backend/package.json b/backend/package.json index a815003a9..34ca100d5 100644 --- a/backend/package.json +++ b/backend/package.json @@ -116,7 +116,7 @@ "^.+\\.(t|j)s$": [ "ts-jest", { - "tsconfig": "test/tsconfig.json", + "tsconfig": "jest.tsconfig.json", "diagnostics": { "ignoreCodes": [ 151002 @@ -125,6 +125,10 @@ } ] }, + "transformIgnorePatterns": [ + "/node_modules/", + "/../commons/dist/cjs/" + ], "coverageDirectory": "../coverage", "testEnvironment": "node", "reporters": [ diff --git a/backend/src/frontend-config/frontend-config.service.spec.ts b/backend/src/frontend-config/frontend-config.service.spec.ts index 00557185c..de7d33489 100644 --- a/backend/src/frontend-config/frontend-config.service.spec.ts +++ b/backend/src/frontend-config/frontend-config.service.spec.ts @@ -153,6 +153,7 @@ describe('FrontendConfigService', () => { type: AuthProviderType.LDAP, providerName: authConfig.ldap[0].providerName, identifier: authConfig.ldap[0].identifier, + theme: null, }); } if (authConfig.oidc.length > 0) { @@ -162,6 +163,7 @@ describe('FrontendConfigService', () => { type: AuthProviderType.OIDC, providerName: authConfig.oidc[0].providerName, identifier: authConfig.oidc[0].identifier, + theme: null, }); } }); diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 82609dcc2..ac28fe481 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -11,7 +11,6 @@ "outDir": "./dist", "incremental": true, "strict": true, - "strictNullChecks": true, "strictPropertyInitialization": false, "resolveJsonModule": true, "useDefineForClassFields": false,