forked from farestrad/LLM-Assisted-Secure-Coding
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
22 lines (20 loc) · 845 Bytes
/
Copy pathjest.config.js
File metadata and controls
22 lines (20 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.json' }], // Updated to follow ts-jest's new recommendation
},
extensionsToTreatAsEsm: ['.ts'], // Handle ESM correctly
modulePathIgnorePatterns: ['<rootDir>/out/'], // Ignore build artifacts
// ✅ Removed deprecated 'globals' & integrated into 'transform'
collectCoverage: true,
collectCoverageFrom: [
'src/testers/c/**/*.{js,ts,jsx,tsx}', // Covers all JavaScript/TypeScript files inside the 'c' folder
],
coverageReporters: ['html', 'text'], // Generate HTML & console reports
coverageDirectory: '<rootDir>/coverage', // Coverage output directory
// ✅ Added to prevent duplicate mock issues
moduleNameMapper: {
'^vscode$': '<rootDir>/src/test/__mocks__/vscode.ts',
},
};