-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix imports and jest config to work properly as esmodule
- Loading branch information
1 parent
f459bd2
commit dba10df
Showing
45 changed files
with
274 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodejs 18.20.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
const config = { | ||
moduleFileExtensions: ['js', 'ts'], | ||
moduleFileExtensions: ["js", "ts"], | ||
transform: { | ||
'^.+\\.(js|jsx|ts|tsx)$': [ | ||
'ts-jest', | ||
"^.+\\.(ts|tsx)$": [ | ||
"ts-jest", | ||
{ | ||
tsconfig: '<rootDir>/test/tsconfig.json' | ||
} | ||
] | ||
tsconfig: "<rootDir>/test/tsconfig.json", | ||
useESM: true, | ||
}, | ||
], | ||
}, | ||
testMatch: ['**/test/**/*.test.(ts|js)'], | ||
testEnvironment: 'node', | ||
setupFilesAfterEnv: ['jest-extended/all'], | ||
preset: 'ts-jest' | ||
} | ||
extensionsToTreatAsEsm: [".ts"], | ||
moduleNameMapper: { | ||
"^(\\.{1,2}/.*)\\.js$": "$1", | ||
}, | ||
testMatch: ["**/test/**/*.test.(ts|js)"], | ||
testEnvironment: "node", | ||
setupFilesAfterEnv: ["jest-extended/all"], | ||
preset: "ts-jest", | ||
}; | ||
|
||
export default config | ||
export default config; |
Oops, something went wrong.