Copilot assisted move from babel-jest to swc/jest.

This commit is contained in:
Jade Welton
2026-03-02 08:01:37 -08:00
parent b478f2732c
commit 7b579725ed
3 changed files with 278 additions and 556 deletions
+23 -1
View File
@@ -169,7 +169,29 @@ module.exports = {
// A map from regular expressions to paths to transformers
transform: {
"^.+\\.html?$": "jest-html-loader",
"^.+\\.[t|j]sx?$": "babel-jest",
"^.+\\.[t|j]sx?$": [
"@swc/jest",
{
jsc: {
parser: {
syntax: "typescript",
tsx: true,
decorators: true,
},
transform: {
legacyDecorator: true,
decoratorMetadata: true,
react: {
runtime: "automatic",
},
},
target: "es2022",
},
module: {
type: "commonjs",
},
},
],
"^.+\\.svg$": "<rootDir>/jest/svgTransform.js",
},