From 098ebd0445370ce6b9ff0ba72a425c07bf231aa4 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Thu, 29 Apr 2021 19:09:15 +0200 Subject: [PATCH] Disable strict mode for tests Signed-off-by: David Mehren --- jest-e2e.json | 7 ++++++- package.json | 7 ++++++- tsconfig.test.json | 6 ++++++ tsconfig.test.json.license | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tsconfig.test.json create mode 100644 tsconfig.test.json.license diff --git a/jest-e2e.json b/jest-e2e.json index 7594b2068..4dccfdafa 100644 --- a/jest-e2e.json +++ b/jest-e2e.json @@ -13,5 +13,10 @@ "^.+\\.(t|j)s$": "ts-jest" }, "coverageDirectory": "./coverage-e2e", - "testTimeout": 10000 + "testTimeout": 10000, + "globals": { + "ts-jest": { + "tsconfig": "tsconfig.test.json" + } + } } diff --git a/package.json b/package.json index 23cd9d452..5d73538cc 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,11 @@ "^.+\\.(t|j)s$": "ts-jest" }, "coverageDirectory": "../coverage", - "testEnvironment": "node" + "testEnvironment": "node", + "globals": { + "ts-jest": { + "tsconfig": "tsconfig.test.json" + } + } } } diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 000000000..5787af45b --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "strict": false + } +} diff --git a/tsconfig.test.json.license b/tsconfig.test.json.license new file mode 100644 index 000000000..078e5a9ac --- /dev/null +++ b/tsconfig.test.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + +SPDX-License-Identifier: CC0-1.0