@@ -5,17 +5,35 @@ module.exports = {
55 moduleFileExtensions : [ 'ts' , 'tsx' , 'js' , 'jsx' , 'json' , 'node' ] ,
66 transform : {
77 '^.+\\.tsx?$' : [ 'ts-jest' , {
8- tsconfig : 'tsconfig.json'
8+ tsconfig : {
9+ "module" : "CommonJS" ,
10+ "moduleResolution" : "node" ,
11+ "esModuleInterop" : true ,
12+ "allowJs" : true
13+ }
914 } ]
1015 } ,
1116 testMatch : [ '**/__tests__/**/*.test.ts' ] ,
1217 moduleNameMapper : {
13- '^vscode$' : '<rootDir>/node_modules/@types/vscode/index.d.ts'
18+ '^vscode$' : '<rootDir>/src/__mocks__/vscode.js' ,
19+ '@modelcontextprotocol/sdk$' : '<rootDir>/src/__mocks__/@modelcontextprotocol/sdk/index.js' ,
20+ '@modelcontextprotocol/sdk/(.*)' : '<rootDir>/src/__mocks__/@modelcontextprotocol/sdk/$1' ,
21+ '^delay$' : '<rootDir>/src/__mocks__/delay.js' ,
22+ '^p-wait-for$' : '<rootDir>/src/__mocks__/p-wait-for.js' ,
23+ '^globby$' : '<rootDir>/src/__mocks__/globby.js' ,
24+ '^serialize-error$' : '<rootDir>/src/__mocks__/serialize-error.js' ,
25+ '^strip-ansi$' : '<rootDir>/src/__mocks__/strip-ansi.js' ,
26+ '^default-shell$' : '<rootDir>/src/__mocks__/default-shell.js' ,
27+ '^os-name$' : '<rootDir>/src/__mocks__/os-name.js'
1428 } ,
29+ transformIgnorePatterns : [
30+ 'node_modules/(?!(@modelcontextprotocol|delay|p-wait-for|globby|serialize-error|strip-ansi|default-shell|os-name)/)'
31+ ] ,
1532 setupFiles : [ ] ,
1633 globals : {
1734 'ts-jest' : {
18- diagnostics : false
35+ diagnostics : false ,
36+ isolatedModules : true
1937 }
2038 }
2139} ;
0 commit comments