From 266446f131eb80bda9be57aed2bf770332a87d1f Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Tue, 17 May 2022 14:55:11 +0800 Subject: [PATCH] add swc config --- jest.config.mjs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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'],