File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 55
66import type { Config } from 'jest' ;
77import { pathsToModuleNameMapper } from "ts-jest" ;
8- import { createRequire } from 'module' ;
9- const { compilerOptions } = createRequire ( import . meta. url ) ( './tsconfig.json' ) ;
8+ import fs from "node:fs" ;
109
10+ const { compilerOptions } = JSON . parse ( fs . readFileSync ( './tsconfig.json' , 'utf8' ) ) ;
1111const compilerPaths = compilerOptions . paths as Record < string , string [ ] > ;
1212const cleanedPaths : Record < string , string [ ] > = { } ;
1313Object . keys ( compilerPaths ) . forEach ( ( key ) => {
@@ -119,7 +119,7 @@ const config: Config = {
119119 // notifyMode: "failure-change",
120120
121121 // A preset that is used as a base for Jest's configuration
122- // preset: undefined ,
122+ preset : 'ts-jest' ,
123123
124124 // Run tests from one or more projects
125125 // projects: undefined,
You can’t perform that action at this time.
0 commit comments