forked from TykTechnologies/api-to-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (28 loc) · 841 Bytes
/
jest.config.js
File metadata and controls
28 lines (28 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json'],
collectCoverage: true,
coverageReporters: ['text', 'lcov'],
coverageDirectory: 'coverage',
setupFilesAfterEnv: ['./test/jest.setup.js'],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
// ts-jest configuration options
tsconfig: 'tsconfig.json',
}],
'^.+\\.jsx?$': 'babel-jest',
},
// Ignore node_modules and dist directories
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
// Module name mapper for aliases if needed
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
// Transform node_modules that use ESM
transformIgnorePatterns: [
'/node_modules/(?!(openapi-overlays-js)).+\\.js$'
],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
};