From e161d3554c5fd3a9d37518c42c9f44b317a62e7f Mon Sep 17 00:00:00 2001
From: Jan Loewe <jan.loewe@ptb.de>
Date: Fri, 16 Jun 2023 15:47:44 +0200
Subject: [PATCH] fix(ts): fix build and tests tsconfig.json

---
 jest.config.ts      | 8 ++++++++
 tests/tsconfig.json | 3 +++
 tsconfig.json       | 3 ---
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/jest.config.ts b/jest.config.ts
index 85289d3..1e5b8e4 100644
--- a/jest.config.ts
+++ b/jest.config.ts
@@ -5,6 +5,14 @@ const config: JestConfigWithTsJest = {
   testEnvironment: "node",
   reporters: ["default", "jest-junit"],
   coverageProvider: "v8",
+  transform: {
+    "^.+\\.m?[tj]sx?$": [
+      "ts-jest",
+      {
+        tsconfig: "tests/tsconfig.json",
+      },
+    ],
+  },
 };
 
 export default config;
diff --git a/tests/tsconfig.json b/tests/tsconfig.json
index 6ddab7a..e6db6f1 100644
--- a/tests/tsconfig.json
+++ b/tests/tsconfig.json
@@ -4,4 +4,7 @@
     "declaration": true,
     "module": "commonjs"
   },
+  "files": [
+    "./index.d.ts"
+  ]
 }
diff --git a/tsconfig.json b/tsconfig.json
index 5136c1b..c5294d3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,9 +6,6 @@
     "sourceMap": true,
     "outDir": "./lib",
   },
-  "files": [
-    "./tests/index.d.ts"
-  ],
   "include": [
     "src"
   ],
-- 
GitLab