@@ -396,7 +396,7 @@ test('results when fail-fast is enabled', function (t) {
396
396
' ' + chalk . red ( '1 test failed' ) + time ,
397
397
'' ,
398
398
'' ,
399
- ' ' + colors . failFast ( '`--fail-fast` is on. Any number of tests may have been skipped' ) ,
399
+ ' ' + colors . information ( '`--fail-fast` is on. Any number of tests may have been skipped' ) ,
400
400
''
401
401
] . join ( '\n' ) ;
402
402
@@ -467,6 +467,46 @@ test('reporter.stdout and reporter.stderr both use process.stderr.write', functi
467
467
t . end ( ) ;
468
468
} ) ;
469
469
470
+ test ( 'results when hasExclusive is enabled, but there are no known remaining tests' , function ( t ) {
471
+ var reporter = verboseReporter ( ) ;
472
+ var runStatus = createRunStatus ( ) ;
473
+ runStatus . hasExclusive = true ;
474
+ runStatus . passCount = 1 ;
475
+
476
+ var output = reporter . finish ( runStatus ) ;
477
+ var expectedOutput = [
478
+ '' ,
479
+ ' ' + chalk . green ( '1 test passed' ) + time ,
480
+ ''
481
+ ] . join ( '\n' ) ;
482
+
483
+ t . is ( output , expectedOutput ) ;
484
+ t . end ( ) ;
485
+ } ) ;
486
+
487
+ test ( 'results when hasExclusive is enabled, but there are remaining tests' , function ( t ) {
488
+ var reporter = verboseReporter ( ) ;
489
+ var runStatus = createRunStatus ( ) ;
490
+ runStatus . hasExclusive = true ;
491
+ runStatus . testCount = 2 ;
492
+ runStatus . passCount = 1 ;
493
+ runStatus . failCount = 0 ;
494
+ runStatus . remainingCount = 1 ;
495
+
496
+ var output = reporter . finish ( runStatus ) ;
497
+ var expectedOutput = [
498
+ '' ,
499
+ ' ' + chalk . green ( '1 test passed' ) + time ,
500
+ '' ,
501
+ '' ,
502
+ ' ' + colors . information ( 'The .only() modifier is used in some tests. 1 test(s) were not run.' ) ,
503
+ ''
504
+ ] . join ( '\n' ) ;
505
+
506
+ t . is ( output , expectedOutput ) ;
507
+ t . end ( ) ;
508
+ } ) ;
509
+
470
510
function fooFunc ( ) {
471
511
barFunc ( ) ;
472
512
}
0 commit comments