diff --git a/jest.config.mjs b/jest.config.mjs index 39c7f9c7c659..28ba5e66a6d7 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -43,7 +43,18 @@ export default { '/packages/docusaurus-utils/src/index.ts', ], transform: { - '^.+\\.[jt]sx?$': '@swc/jest', + '^.+\\.[jt]sx?$': [ + '@swc/jest', + { + jsc: { + parser: { + syntax: 'typescript', + tsx: true, + }, + target: 'es2020', + }, + }, + ], }, errorOnDeprecated: true, reporters: ['default', 'github-actions'],