File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 1- import type { JestConfigWithTsJest } from 'ts-jest'
2- import { pathsToModuleNameMapper } from 'ts-jest'
3- import { readFileSync } from 'fs'
4- import path from 'path'
1+ import { pathsToModuleNameMapper , type JestConfigWithTsJest } from 'ts-jest' ;
2+ import { readFileSync } from 'fs' ;
3+ import path from 'path' ;
54
6- const tsconfig = JSON . parse ( readFileSync ( path . join ( __dirname , 'tsconfig.json' ) , 'utf-8' ) )
5+ const tsconfig = JSON . parse (
6+ readFileSync ( path . join ( __dirname , 'tsconfig.json' ) , 'utf-8' )
7+ ) ;
78
89const config : JestConfigWithTsJest = {
910 preset : 'ts-jest' ,
1011 testEnvironment : 'node' ,
1112 testMatch : [ '**/__tests__/**/*.test.ts' ] ,
13+ transform : {
14+ '^.+\\.tsx?$' : [ 'ts-jest' , {
15+ tsconfig : 'tsconfig.json' ,
16+ } ] ,
17+ } ,
1218 moduleNameMapper : pathsToModuleNameMapper ( tsconfig . compilerOptions . paths , {
1319 prefix : '<rootDir>/src/' ,
1420 } ) ,
15- globals : {
16- 'ts-jest' : {
17- isolatedModules : true ,
18- } ,
19- } ,
20- }
21+ } ;
2122
22- export default config
23+ export default config ;
Original file line number Diff line number Diff line change 55 "target" : " es2022" ,
66 "module" : " commonjs" ,
77 "esModuleInterop" : true ,
8+ "isolatedModules" : true ,
89 "forceConsistentCasingInFileNames" : true ,
910 "strict" : true ,
1011 "skipLibCheck" : true ,
You can’t perform that action at this time.
0 commit comments