updates jest.config.ts and tsconfig.json to get dependencies on tests

This commit is contained in:
albert
2025-07-28 23:05:37 +02:00
parent b787c7dc22
commit 5be3908ccf
2 changed files with 14 additions and 7 deletions

View File

@ -3,12 +3,14 @@ import type { Config } from 'jest';
const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/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',
},
};

View File

@ -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"]
}