File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ Results.prototype.push = function (t) {
4747 t . on ( 'test' , function ( st ) {
4848 subtests ++ ;
4949 st . on ( 'end' , function ( ) {
50- nextTick ( function ( ) {
51- if ( -- subtests === 0 && ! plan ) t . emit ( 'end' ) ;
52- } ) ;
50+ subtests -- ;
51+ if ( subtests === 0 && ! plan ) t . emit ( 'end' ) ;
52+ onend ( ) ;
5353 } ) ;
5454 self . push ( st ) ;
5555 } ) ;
@@ -66,13 +66,15 @@ Results.prototype.push = function (t) {
6666 else self . fail ++
6767 } ) ;
6868
69- t . on ( 'end' , function ( ) {
69+ t . on ( 'end' , onend ) ;
70+
71+ function onend ( ) {
7072 nextTick ( function ( ) {
71- if ( subtests = == 0 ) return ;
73+ if ( subtests ! == 0 ) return ;
7274 if ( self . tests . length === 0 ) self . close ( ) ;
7375 else self . tests . shift ( ) . run ( ) ;
7476 } ) ;
75- } ) ;
77+ }
7678} ;
7779
7880Results . prototype . close = function ( ) {
You can’t perform that action at this time.
0 commit comments