Files
exp-min/jest.config.js
2025-06-21 23:09:28 -05:00

34 lines
740 B
JavaScript

import { createDefaultPreset } from "ts-jest";
const tsJestTransformCfg = createDefaultPreset().transform;
/** @type {import("jest").Config} **/
export const testEnvironment = "node";
export const transform = {
...tsJestTransformCfg,
'^.+\\.jsx?$': [
'ts-jest',
{
tsconfig: {
// Overrides the tsconfig.json module setting to allow for CommonJS modules in tests
allowJs: true,
},
},
]
};
export const moduleNameMapper = {
// Handle module aliases
'^@routers/(.*)$': '<rootDir>/src/routers/$1',
}
export const coverageThreshold = {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10,
},
};
export const coverageReporters = ['text'];