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',
},
};