og-edopro-server-ts/jest.config.js
Diango Gavidia 58ccaf2061
chore(deps): upgrade to TypeScript 6 (#280)
Bump typescript 5.9.3 -> 6.0.3. Application code compiles unchanged; the
only tsc output were tsconfig deprecation warnings (baseUrl, node10
moduleResolution), silenced via ignoreDeprecations "6.0" until the TS 7
config migration.

TS 6 stopped auto-loading ambient @types for files outside the tsconfig
include, which broke ts-jest type-checking of the (excluded) test files
(Cannot find name 'describe/expect/it'). Added tsconfig.test.json so
ts-jest type-checks with types [node, jest] without leaking jest types
into the production build.

Bump the test toolchain to versions that declare TS 6 support and clear
peer-dependency resolution:
- ts-jest 29.4.5 -> 29.4.11
- jest-mock-extended 4.0.0 -> 4.0.1
- typescript-eslint (+ plugin/parser) 8.48 -> 8.61.1

Verified: build green, 702/702 tests pass, lint clean.
2026-06-19 08:59:43 -04:00

14 lines
No EOL
414 B
JavaScript

const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig");
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
roots: ["<rootDir>/src"],
maxWorkers: "50%",
transform: {
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "tsconfig.test.json" }],
},
};