mirror of
https://gh.wpcy.net/https://github.com/verygoodplugins/mcp-freescout.git
synced 2026-05-29 04:54:12 +08:00
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
transform: {
|
|
'^.+\\.tsx?$': [
|
|
'ts-jest',
|
|
{
|
|
useESM: true,
|
|
tsconfig: {
|
|
module: 'ESNext',
|
|
moduleResolution: 'node',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
},
|
|
testMatch: ['**/__tests__/**/*.test.ts'],
|
|
collectCoverageFrom: [
|
|
'src/**/*.ts',
|
|
'!src/**/*.d.ts',
|
|
'!src/__tests__/**',
|
|
'!src/index.ts', // Integration/CLI file
|
|
],
|
|
// Disable coverage thresholds for now to reduce memory usage
|
|
// coverageThreshold: {
|
|
// global: {
|
|
// branches: 70,
|
|
// functions: 70,
|
|
// lines: 70,
|
|
// statements: 70,
|
|
// },
|
|
// },
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.cjs'],
|
|
testTimeout: 10000,
|
|
clearMocks: true,
|
|
resetMocks: true,
|
|
restoreMocks: true,
|
|
maxWorkers: 1, // Run tests serially to avoid memory issues
|
|
workerIdleMemoryLimit: '512MB', // Restart workers if they use too much memory
|
|
};
|