forked from punkpeye/arxiv-mcp-server-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (35 loc) · 924 Bytes
/
jest.config.js
File metadata and controls
37 lines (35 loc) · 924 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
29
30
31
32
33
34
35
36
37
// @ts-check
/** @type {import('ts-jest').JestConfigWithTsJest} */
const config = {
preset: 'ts-jest/presets/default-esm', // Use ESM preset
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'js', 'json'],
extensionsToTreatAsEsm: ['.ts'], // Treat .ts as ESM
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1', // Adjust imports ending in .js
'^@/(.*)$': '<rootDir>/src/$1',
},
transform: {
'^.+\\.tsx?$': [ // Transform TS/TSX with ts-jest using ESM options
'ts-jest',
{
useESM: true,
tsconfig: 'tsconfig.json', // Explicitly point to tsconfig
},
],
},
testMatch: ['**/test/**/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
],
coverageDirectory: 'coverage',
testTimeout: 10000,
globals: {
'ts-jest': {
useESM: true
}
}
};
export default config;