@@ -38,10 +38,10 @@ if (argv.length > 0) {
3838 '-' , '\\' , '|' , '/'
3939 ] ;
4040 var current = 0 ,
41- runningTests = false ,
41+ runningTests = 0 ,
4242 currentFile ,
4343 gracePeriod = 0 ,
44- statusText ,
44+ status ,
4545 lastRun ,
4646 testFolder ,
4747 colors = [ '32m' , '33m' , '31m' ] ,
@@ -62,7 +62,7 @@ if (argv.length > 0) {
6262 function tick ( ) {
6363 cursorSave ( ) ;
6464 eraseLine ( ) ;
65- lastRun && esc ( colors [ statusText . errored ? 2 : ( statusText . broken ? 1 : 0 ) ] ) ;
65+ lastRun && esc ( colors [ status . errored ? 2 : ( status . broken ? 1 : 0 ) ] ) ;
6666
6767 if ( runningTests > 0 || gracePeriod ) {
6868 gracePeriod -- ;
@@ -73,7 +73,7 @@ if (argv.length > 0) {
7373 } else {
7474 print ( clock [ current ] ) ;
7575 print ( ' ' ) ;
76- statusText && print ( console . report ( [ 'finish' , statusText ] , null ) ) ;
76+ status && print ( console . report ( [ 'finish' , status ] , null ) ) ;
7777 if ( lastRun ) {
7878 esc ( '90m' ) ;
7979 print ( ' (' + lastRun . valueOf ( ) + ')' ) ;
@@ -103,7 +103,7 @@ if (argv.length > 0) {
103103 // Run the matching tests and change the status.
104104 //
105105 function changed ( file ) {
106- statusText = { honored : 0 , broken : 0 , errored : 0 } ;
106+ status = { honored : 0 , broken : 0 , errored : 0 } ;
107107 gracePeriod = 10 ;
108108 current = 0 ;
109109
@@ -117,9 +117,9 @@ if (argv.length > 0) {
117117 runTest ( p ) . addListener ( 'finish' , function ( obj ) {
118118 runningTests -- ;
119119 delete obj . time ;
120- statusText . honored += obj . honored ;
121- statusText . broken += obj . broken ;
122- statusText . errored += obj . errored ;
120+ status . honored += obj . honored ;
121+ status . broken += obj . broken ;
122+ status . errored += obj . errored ;
123123 lastRun = new ( Date ) ;
124124 } ) ;
125125 } ) ;
0 commit comments