Skip to content

Commit

Permalink
Use @swc/jest
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 committed Nov 23, 2024
1 parent 52738d8 commit c59e3cc
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 108 deletions.
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest/presets/default-esm',
clearMocks: true,
// https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@actions/core": "1.11.1"
},
"devDependencies": {
"@swc/jest": "^0.2.37",
"@tsconfig/recommended": "1.0.8",
"@types/jest": "29.5.14",
"@types/node": "20.17.6",
Expand All @@ -19,7 +20,6 @@
"eslint-plugin-jest": "28.9.0",
"jest": "29.7.0",
"prettier": "3.3.3",
"ts-jest": "29.2.5",
"typescript": "5.7.2",
"typescript-eslint": "8.15.0"
},
Expand Down
Loading

0 comments on commit c59e3cc

Please sign in to comment.