2025-08-11 11:34:38 +08:00
|
|
|
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
|
|
|
module.exports = {
|
|
|
|
|
preset: 'ts-jest',
|
|
|
|
|
testEnvironment: 'node',
|
|
|
|
|
roots: ['<rootDir>/tests'],
|
|
|
|
|
testMatch: ['**/performance/**/*.test.ts', '**/*.performance.test.ts'],
|
|
|
|
|
collectCoverage: false,
|
|
|
|
|
verbose: true,
|
|
|
|
|
transform: {
|
|
|
|
|
'^.+\\.tsx?$': ['ts-jest', {
|
|
|
|
|
tsconfig: 'tsconfig.json',
|
|
|
|
|
useESM: false,
|
|
|
|
|
}],
|
|
|
|
|
},
|
|
|
|
|
moduleNameMapper: {
|
|
|
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
|
|
|
},
|
|
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
|
2025-09-29 09:04:53 +08:00
|
|
|
testTimeout: 0,
|
2025-08-11 11:34:38 +08:00
|
|
|
clearMocks: true,
|
|
|
|
|
restoreMocks: true,
|
|
|
|
|
modulePathIgnorePatterns: [
|
|
|
|
|
'<rootDir>/bin/',
|
|
|
|
|
'<rootDir>/dist/',
|
|
|
|
|
'<rootDir>/node_modules/'
|
|
|
|
|
]
|
|
|
|
|
};
|