/** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], transform: { '^.+\\.tsx?$': ['ts-jest', { tsconfig: { "module": "CommonJS", "moduleResolution": "node", "esModuleInterop": true, "allowJs": true } }] }, testMatch: ['**/__tests__/**/*.test.ts'], moduleNameMapper: { '^vscode$': '/src/__mocks__/vscode.js', '@modelcontextprotocol/sdk$': '/src/__mocks__/@modelcontextprotocol/sdk/index.js', '@modelcontextprotocol/sdk/(.*)': '/src/__mocks__/@modelcontextprotocol/sdk/$1', '^delay$': '/src/__mocks__/delay.js', '^p-wait-for$': '/src/__mocks__/p-wait-for.js', '^globby$': '/src/__mocks__/globby.js', '^serialize-error$': '/src/__mocks__/serialize-error.js', '^strip-ansi$': '/src/__mocks__/strip-ansi.js', '^default-shell$': '/src/__mocks__/default-shell.js', '^os-name$': '/src/__mocks__/os-name.js' }, transformIgnorePatterns: [ 'node_modules/(?!(@modelcontextprotocol|delay|p-wait-for|globby|serialize-error|strip-ansi|default-shell|os-name)/)' ], setupFiles: [], globals: { 'ts-jest': { diagnostics: false, isolatedModules: true } } };