@@ -19,7 +19,7 @@ const replacePathSepForRegex = (string: string) => {
19
19
20
20
const NODE_MODULES_REGEXP = replacePathSepForRegex ( NODE_MODULES ) ;
21
21
22
- const defaultConfig = {
22
+ export const defaultConfig = {
23
23
automock : false ,
24
24
bail : 0 ,
25
25
cacheDirectory : path . join ( tmpdir ( ) , 'jest' ) ,
@@ -55,7 +55,7 @@ const defaultConfig = {
55
55
watchPathIgnorePatterns : [ ] ,
56
56
} ;
57
57
58
- const validConfig = {
58
+ export const validConfig = {
59
59
automock : false ,
60
60
bail : 0 ,
61
61
cache : true ,
@@ -121,10 +121,12 @@ const validConfig = {
121
121
} ;
122
122
123
123
const format = ( value : string ) =>
124
- require ( 'pretty-format' ) . format ( value , { min : true } ) ;
124
+ ( require ( 'pretty-format' ) as typeof import ( 'pretty-format' ) ) . format ( value , {
125
+ min : true ,
126
+ } ) ;
125
127
126
- const deprecatedConfig = {
127
- preprocessorIgnorePatterns : ( config : Record < string , any > ) =>
128
+ export const deprecatedConfig = {
129
+ preprocessorIgnorePatterns : ( config : { preprocessorIgnorePatterns : string } ) =>
128
130
` Option ${ chalk . bold (
129
131
'preprocessorIgnorePatterns' ,
130
132
) } was replaced by ${ chalk . bold (
@@ -140,7 +142,7 @@ const deprecatedConfig = {
140
142
141
143
Please update your configuration.` ,
142
144
143
- scriptPreprocessor : ( config : Record < string , any > ) =>
145
+ scriptPreprocessor : ( config : { scriptPreprocessor : string } ) =>
144
146
` Option ${ chalk . bold ( 'scriptPreprocessor' ) } was replaced by ${ chalk . bold (
145
147
'transform' ,
146
148
) } , which support multiple preprocessors.
@@ -154,9 +156,3 @@ const deprecatedConfig = {
154
156
155
157
Please update your configuration.` ,
156
158
} ;
157
-
158
- module . exports = {
159
- defaultConfig,
160
- deprecatedConfig,
161
- validConfig,
162
- } ;
0 commit comments