@@ -206,7 +206,10 @@ function findFiles() {
206
206
}
207
207
208
208
const files = [ ]
209
- visit ( testDir )
209
+ for ( const entry of fs . readdirSync ( testDir ) ) {
210
+ if ( entry === 'staging' || entry === 'intl402' || entry === 'built-ins' ) continue // We're not interested in these
211
+ visit ( path . join ( testDir , entry ) )
212
+ }
210
213
211
214
// Reverse for faster iteration times because many of the more interesting tests come last
212
215
return files . reverse ( )
@@ -334,17 +337,11 @@ async function checkBuildAPI({ esbuild, file, content, yaml }) {
334
337
throw error
335
338
}
336
339
337
- // Don't evaluate files in the "staging" or "intl402" areas
338
- const relPath = path . relative ( testDir , file )
339
- if ( relPath . startsWith ( 'staging' ) || relPath . startsWith ( 'intl402' ) ) {
340
- return
341
- }
342
-
343
340
// Don't evaluate problematic files
344
341
const hasDirectEval = result . warnings . some ( msg => msg . id === 'direct-eval' )
345
342
if (
346
343
hasDirectEval ||
347
- skipEvaluatingTheseTests . has ( relPath ) ||
344
+ skipEvaluatingTheseTests . has ( path . relative ( testDir , file ) ) ||
348
345
( yaml . includes && yaml . includes . some ( include => skipEvaluatingTheseIncludes . has ( include ) ) ) ||
349
346
( yaml . features && yaml . features . some ( feature => skipEvaluatingTheseFeatures . has ( feature ) ) )
350
347
) {
@@ -421,8 +418,7 @@ async function main() {
421
418
console . log ( `Found ${ files . length } test files` )
422
419
423
420
console . log ( `\n${ dimColor } Installing esbuild...${ resetColor } ` )
424
- // const esbuild = installForTests()
425
- const esbuild = require ( '/tmp/esbuild-xfrtyp2495b/node_modules/esbuild' )
421
+ const esbuild = installForTests ( )
426
422
427
423
console . log ( `\n${ dimColor } Running tests...${ resetColor } \n` )
428
424
const errorCounts = { }
@@ -465,15 +461,15 @@ async function main() {
465
461
for ( const kind of Object . keys ( errorCounts ) . sort ( ) ) {
466
462
table . push ( [ kind + ' errors' , `${ errorCounts [ kind ] } ` ] )
467
463
}
464
+ const seconds = ( Date . now ( ) - startTime ) / 1000
465
+ const minutes = Math . floor ( seconds / 60 )
466
+ table . push ( [ 'Time taken' , `${ minutes ? `${ minutes } min ${ + ( seconds - minutes * 60 ) . toFixed ( 1 ) } sec` : `${ + seconds . toFixed ( 1 ) } sec` } ` ] )
468
467
const maxLength = Math . max ( ...table . map ( x => x [ 0 ] . length ) )
468
+ printNewlineWhenErasing = true
469
469
process . stdout . write ( eraseProgressBar ( ) )
470
470
for ( const [ key , value ] of table ) {
471
471
console . log ( `${ boldColor } ${ ( key + ':' ) . padEnd ( maxLength + 1 ) } ${ resetColor } ${ value } ` )
472
472
}
473
-
474
- const seconds = ( Date . now ( ) - startTime ) / 1000
475
- const minutes = Math . floor ( seconds / 60 )
476
- table . push ( [ 'Time taken' , `${ minutes ? `${ minutes } min ${ + ( seconds - minutes * 60 ) . toFixed ( 1 ) } sec` : `${ + seconds . toFixed ( 1 ) } sec` } ` ] )
477
473
}
478
474
479
475
function forEachInParallel ( items , batchSize , callback ) {
0 commit comments