From 5a64e9874e7e4e56f2dcb9d033d12966a84bb061 Mon Sep 17 00:00:00 2001 From: "qingyi.xjh" Date: Mon, 23 Dec 2024 17:47:57 +0800 Subject: [PATCH] feat: enhance Jest configuration with custom transform settings --- jest.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jest.config.js b/jest.config.js index 26fdd5824d..43ce37b480 100644 --- a/jest.config.js +++ b/jest.config.js @@ -112,6 +112,22 @@ module.exports = { '**/packages/extension/__tests__/{hosted,common}/**/?(*.)+(spec|test).[jt]s?(x)', '**/packages/{components,core-browser,core-common,electron-basic}/__tests__/**/?(*.)+(spec|test).[jt]s?(x)', ], + transformIgnorePatterns: ['/node_modules/(?!(@opensumi/monaco-editor-core)/)'], + transform: { + '^.+\\.(js)$': [ + 'ts-jest', + { + isolatedModules: true, + tsconfig: { + allowJs: true, + module: 'NodeNext', + moduleResolution: 'node', + esModuleInterop: true, + skipLibCheck: true, + }, + }, + ], + }, }, ], };