ts-jest transformer for typescript files

This commit is contained in:
ali 2026-02-26 14:29:18 +02:00
parent c3a572b816
commit 30d69b1ee5
No known key found for this signature in database
GPG key ID: 44F9B42770617B9B

View file

@ -5,10 +5,10 @@ module.exports = {
testEnvironment: "node",
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
testEnvironmentOptions: {
NODE_ENV: "test"
NODE_ENV: "test",
},
transform: {
"^.+\\.tsx?$": [
"^.+\\\\.(ts | tsx)$": [
"ts-jest",
{
useESM: true,
@ -18,9 +18,7 @@ module.exports = {
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
transformIgnorePatterns: [
'node_modules/(?!(@codeflash-ai)/)'
],
transformIgnorePatterns: ["node_modules/(?!(@codeflash-ai)/)"],
extensionsToTreatAsEsm: [".ts", ".tsx"],
testRegex: ".*\\.test\\.ts$",
testPathIgnorePatterns: process.env.CI ? ["e2e.test.ts"] : [],