@@ -38,10 +38,10 @@ if (argv.length > 0) {
38
38
'-' , '\\' , '|' , '/'
39
39
] ;
40
40
var current = 0 ,
41
- runningTests = false ,
41
+ runningTests = 0 ,
42
42
currentFile ,
43
43
gracePeriod = 0 ,
44
- statusText ,
44
+ status ,
45
45
lastRun ,
46
46
testFolder ,
47
47
colors = [ '32m' , '33m' , '31m' ] ,
@@ -62,7 +62,7 @@ if (argv.length > 0) {
62
62
function tick ( ) {
63
63
cursorSave ( ) ;
64
64
eraseLine ( ) ;
65
- lastRun && esc ( colors [ statusText . errored ? 2 : ( statusText . broken ? 1 : 0 ) ] ) ;
65
+ lastRun && esc ( colors [ status . errored ? 2 : ( status . broken ? 1 : 0 ) ] ) ;
66
66
67
67
if ( runningTests > 0 || gracePeriod ) {
68
68
gracePeriod -- ;
@@ -73,7 +73,7 @@ if (argv.length > 0) {
73
73
} else {
74
74
print ( clock [ current ] ) ;
75
75
print ( ' ' ) ;
76
- statusText && print ( console . report ( [ 'finish' , statusText ] , null ) ) ;
76
+ status && print ( console . report ( [ 'finish' , status ] , null ) ) ;
77
77
if ( lastRun ) {
78
78
esc ( '90m' ) ;
79
79
print ( ' (' + lastRun . valueOf ( ) + ')' ) ;
@@ -103,7 +103,7 @@ if (argv.length > 0) {
103
103
// Run the matching tests and change the status.
104
104
//
105
105
function changed ( file ) {
106
- statusText = { honored : 0 , broken : 0 , errored : 0 } ;
106
+ status = { honored : 0 , broken : 0 , errored : 0 } ;
107
107
gracePeriod = 10 ;
108
108
current = 0 ;
109
109
@@ -117,9 +117,9 @@ if (argv.length > 0) {
117
117
runTest ( p ) . addListener ( 'finish' , function ( obj ) {
118
118
runningTests -- ;
119
119
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 ;
123
123
lastRun = new ( Date ) ;
124
124
} ) ;
125
125
} ) ;
0 commit comments