@@ -426,25 +426,43 @@ describe('Base reporter', function() {
426
426
} ) ;
427
427
428
428
describe ( 'when reporter output immune to user test changes' , function ( ) {
429
- var sandbox ;
430
429
var baseConsoleLog ;
431
430
432
431
beforeEach ( function ( ) {
433
- sandbox = sinon . createSandbox ( ) ;
434
432
sandbox . stub ( console , 'log' ) ;
435
433
baseConsoleLog = sandbox . stub ( Base , 'consoleLog' ) ;
436
434
} ) ;
437
435
438
436
it ( 'should let you stub out console.log without effecting reporters output' , function ( ) {
439
437
Base . list ( [ ] ) ;
440
- baseConsoleLog . restore ( ) ;
441
438
442
439
expect ( baseConsoleLog , 'was called' ) ;
443
440
expect ( console . log , 'was not called' ) ;
441
+ sandbox . restore ( ) ;
444
442
} ) ;
443
+ } ) ;
444
+
445
+ describe ( 'epilogue' , function ( ) {
446
+ it ( 'should include "pending" count' , function ( ) {
447
+ var ctx = { stats : { passes : 0 , pending : 2 , skipped : 0 , duration : 12 } } ;
448
+ var epilogue = Base . prototype . epilogue . bind ( ctx ) ;
445
449
446
- afterEach ( function ( ) {
450
+ epilogue ( ) ;
447
451
sandbox . restore ( ) ;
452
+
453
+ var out = stdout . join ( '\n' ) . trim ( ) ;
454
+ expect ( out , 'to contain' , '2 pending' ) . and ( 'not to contain' , 'skipped' ) ;
455
+ } ) ;
456
+
457
+ it ( 'should include "skipped" count' , function ( ) {
458
+ var ctx = { stats : { passes : 0 , pending : 0 , skipped : 3 , duration : 12 } } ;
459
+ var epilogue = Base . prototype . epilogue . bind ( ctx ) ;
460
+
461
+ epilogue ( ) ;
462
+ sandbox . restore ( ) ;
463
+
464
+ var out = stdout . join ( '\n' ) . trim ( ) ;
465
+ expect ( out , 'to contain' , '3 skipped' ) . and ( 'not to contain' , 'pending' ) ;
448
466
} ) ;
449
467
} ) ;
450
468
} ) ;
0 commit comments