Initial commit
This commit is contained in:
33
jest.config.js
Normal file
33
jest.config.js
Normal file
@@ -0,0 +1,33 @@
|
||||
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'];
|
||||
Reference in New Issue
Block a user