Skip to content

Commit

Permalink
typescript and jest, sometimes works, sometimes doesn't
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwn04 committed Jan 9, 2025
1 parent 4664b1b commit a883272
Show file tree
Hide file tree
Showing 3 changed files with 1,133 additions and 1,236 deletions.
28 changes: 16 additions & 12 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"transform": {
"^.+\\.ts$": "ts-jest"
},
"modulePaths": ["<rootDir>/src"],
"testRegex": "tests/.*\\.tests?\\.ts$",
"moduleFileExtensions": [
"ts",
"js",
"json",
"node"
]
}
"transform": {
"^.+\\.ts$": ["ts-jest", { "useESM": true }]
},
"modulePaths": ["<rootDir>/src"],
"testRegex": "tests/.*\\.tests?\\.ts$",
"moduleFileExtensions": [
"ts",
"js",
"json",
"node"
],
"extensionsToTreatAsEsm": [".ts"],
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "$1"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"typedi": "^0.10.0",
"typeorm": "0.3.20",
"typeorm-typedi-extensions": "^0.4.1",
"typescript": "4.4",
"typescript": "5.7",
"underscore": "^1.13.1",
"uuid": "^8.3.1",
"winston": "^3.17.0",
Expand All @@ -86,11 +86,11 @@
"@types/ejs": "^3.0.4",
"@types/express": "^4.17.11",
"@types/faker": "^5.5.5",
"@types/jest": "^27.0.2",
"@types/jest": "^29.5.14",
"@types/jsonwebtoken": "^8.5.0",
"@types/morgan": "^1.9.1",
"@types/multer": "^1.4.4-lts.1",
"@types/node": "^14.0.13",
"@types/node": "^22.10.5",
"@types/rfdc": "^1.1.0",
"@types/underscore": "^1.10.4",
"@types/uuid": "^8.3.0",
Expand All @@ -101,7 +101,7 @@
"eslint-plugin-import": "^2.22.1",
"jest": "^29.7.0",
"rfdc": "^1.3.0",
"ts-jest": "^29.1.2",
"ts-jest": "^29.2.5",
"ts-mockito": "^2.6.1"
}
}
Loading

0 comments on commit a883272

Please sign in to comment.