@@ -97,6 +97,13 @@ const argv = yargs
97
97
requiresArg : true ,
98
98
type : 'string' ,
99
99
} ,
100
+ compactConsole : {
101
+ alias : 'c' ,
102
+ describe : 'Compact console output (hide file locations).' ,
103
+ requiresArg : false ,
104
+ type : 'boolean' ,
105
+ default : false ,
106
+ } ,
100
107
} ) . argv ;
101
108
102
109
function logError ( message ) {
@@ -159,6 +166,11 @@ function validateOptions() {
159
166
logError ( 'DevTool tests require --build.' ) ;
160
167
success = false ;
161
168
}
169
+ } else {
170
+ if ( argv . compactConsole ) {
171
+ logError ( 'Only DevTool tests support compactConsole flag.' ) ;
172
+ success = false ;
173
+ }
162
174
}
163
175
164
176
if ( isWWWConfig ( ) ) {
@@ -284,6 +296,10 @@ function getEnvars() {
284
296
RELEASE_CHANNEL : argv . releaseChannel . match ( / m o d e r n | e x p e r i m e n t a l / )
285
297
? 'experimental'
286
298
: 'stable' ,
299
+
300
+ // Pass this flag through to the confit environment
301
+ // so the base config can conditionally load the console setup file.
302
+ compactConsole : argv . compactConsole ,
287
303
} ;
288
304
289
305
if ( argv . prod ) {
@@ -306,7 +322,9 @@ function main() {
306
322
console . log ( chalk . red ( `\nPlease run: \`${ argv . deprecated } \` instead.\n` ) ) ;
307
323
return ;
308
324
}
325
+
309
326
validateOptions ( ) ;
327
+
310
328
const args = getCommandArgs ( ) ;
311
329
const envars = getEnvars ( ) ;
312
330
const env = Object . entries ( envars ) . map ( ( [ k , v ] ) => `${ k } =${ v } ` ) ;
@@ -334,6 +352,7 @@ function main() {
334
352
stdio : 'inherit' ,
335
353
env : { ...envars , ...process . env } ,
336
354
} ) ;
355
+
337
356
// Ensure we close our process when we get a failure case.
338
357
jest . on ( 'close' , code => {
339
358
// Forward the exit code from the Jest process.
0 commit comments