File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -109,17 +109,17 @@ export class TsJestTransformer implements SyncTransformer {
109
109
if ( config . globals ?. [ 'ts-jest' ] ) {
110
110
this . _logger . warn ( Deprecations . GlobalsTsJestConfigOption )
111
111
}
112
- configSet = this . _createConfigSet (
113
- this . tsJestConfig
114
- ? {
115
- ... config ,
116
- globals : {
117
- 'ts-jest' : this . tsJestConfig ,
118
- } ,
119
- }
120
- : config ,
121
- )
122
- const jest = { ...config }
112
+ const migratedConfig = this . tsJestConfig
113
+ ? {
114
+ ... config ,
115
+ globals : {
116
+ ... ( config . globals ?? Object . create ( null ) ) ,
117
+ 'ts-jest' : this . tsJestConfig ,
118
+ } ,
119
+ }
120
+ : config
121
+ configSet = this . _createConfigSet ( migratedConfig )
122
+ const jest = { ...migratedConfig }
123
123
// we need to remove some stuff from jest config
124
124
// this which does not depend on config
125
125
jest . cacheDirectory = undefined as any // eslint-disable-line @typescript-eslint/no-explicit-any
You can’t perform that action at this time.
0 commit comments