File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1+ import { createJsWithTsPreset } from 'ts-jest' ;
2+
13const nodeVersion = parseInt ( process . version . slice ( 1 ) , 10 ) ;
24
35export default {
4- globals : {
5- 'ts-jest' : {
6- tsconfig : {
7- rewriteRelativeImportExtensions : false ,
8- } ,
6+ ...createJsWithTsPreset ( {
7+ tsconfig : {
8+ // Relative imports in our TS code include `.ts` extensions.
9+ // When compiling the package, TS rewrites them to `.js`,
10+ // but ts-jest runs on the original code where the `.js` files don't exist,
11+ // so this setting needs to be disabled here.
12+ rewriteRelativeImportExtensions : false ,
913 } ,
10- } ,
11- preset : 'ts-jest/presets/js-with-ts' ,
14+ } ) ,
1215 testEnvironment : 'jsdom' ,
1316 setupFiles : [ '<rootDir>/node_package/tests/jest.setup.js' ] ,
1417 // React Server Components tests are compatible with React 19
You can’t perform that action at this time.
0 commit comments