From 5be3908ccfe041b756f7fee34f43f3a37c5e2490 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 28 Jul 2025 23:05:37 +0200 Subject: [PATCH] updates jest.config.ts and tsconfig.json to get dependencies on tests --- jest.config.ts | 6 ++++-- tsconfig.json | 15 ++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 72ec980..2648d1c 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -3,12 +3,14 @@ import type { Config } from 'jest'; const config: Config = { preset: 'ts-jest', testEnvironment: 'node', + roots: ['/src'], + testMatch: ['**/__tests__/**/*.test.ts'], extensionsToTreatAsEsm: ['.ts'], transform: { - '^.+\\.ts$': ['ts-jest', { useESM: true }], + '^.+\.ts$': ['ts-jest', { useESM: true }], }, moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', + '^(\.{1,2}/.*)\.js$': '$1', }, }; diff --git a/tsconfig.json b/tsconfig.json index 687d98b..e92fb93 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,17 @@ { "compilerOptions": { + "target": "ES2020", "module": "ESNext", - "target": "es2020", "moduleResolution": "Node", - "esModuleInterop": true, - "strict": true, "outDir": "dist", - "rootDir": "src" + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": true, + "skipLibCheck": true, + "strict": true }, - "include": ["src"] + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules"] }