Skip to content

Commit e597f90

Browse files
committed
Update FaustWP CLI Jest setup
Add Jest as a dev dependency for the faustwp-cli package and simplify the ts-jest transform config: replace the previous useESM object with an explicit tsconfig option (tsconfig.json). This ensures ts-jest uses the project TypeScript config and keeps the Jest setup concise.
1 parent 34255f3 commit e597f90

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/faustwp-cli/jest.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@ export default {
33

44
// Adds Jest support for TypeScript using ts-jest.
55
transform: {
6-
'^.+\\.tsx?$': [
7-
'ts-jest',
8-
{
9-
useESM: true,
10-
},
11-
],
6+
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.json' }],
127
},
138
testEnvironment: 'jsdom',
149
// Run code before each file in the suite is tested.

packages/faustwp-cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@types/node": "^18.15.11",
1919
"@types/prompt": "1.1.2",
2020
"fetch-mock-jest": "^1.5.1",
21+
"jest": "^29.7.0",
2122
"jest-environment-jsdom": "29.6.4",
2223
"rimraf": "5.0.5",
2324
"ts-jest": "^29.1.1",

0 commit comments

Comments
 (0)