@@ -24,7 +24,7 @@ Results.prototype.createStream = function () {
2424 var self = this ;
2525 var output = resumer ( ) ;
2626 output . queue ( 'TAP version 13\n' ) ;
27-
27+
2828 nextTick ( function next ( ) {
2929 var t ;
3030 while ( t = getNextTest ( self ) ) {
@@ -34,7 +34,7 @@ Results.prototype.createStream = function () {
3434 self . emit ( 'done' ) ;
3535 } ) ;
3636 self . _stream . pipe ( output ) ;
37-
37+
3838 return output ;
3939} ;
4040
@@ -59,7 +59,7 @@ Results.prototype._watch = function (t) {
5959 t . once ( 'prerun' , function ( ) {
6060 write ( '# ' + t . name + '\n' ) ;
6161 } ) ;
62-
62+
6363 t . on ( 'result' , function ( res ) {
6464 if ( typeof res === 'string' ) {
6565 write ( '# ' + res + '\n' ) ;
@@ -71,7 +71,7 @@ Results.prototype._watch = function (t) {
7171 if ( res . ok ) self . pass ++
7272 else self . fail ++
7373 } ) ;
74-
74+
7575 t . on ( 'test' , function ( st ) { self . _watch ( st ) } ) ;
7676} ;
7777
@@ -80,7 +80,7 @@ Results.prototype.close = function () {
8080 if ( self . closed ) self . _stream . emit ( 'error' , new Error ( 'ALREADY CLOSED' ) ) ;
8181 self . closed = true ;
8282 var write = function ( s ) { self . _stream . queue ( s ) } ;
83-
83+
8484 write ( '\n1..' + self . count + '\n' ) ;
8585 write ( '# tests ' + self . count + '\n' ) ;
8686 write ( '# pass ' + self . pass + '\n' ) ;
@@ -94,21 +94,21 @@ function encodeResult (res, count) {
9494 var output = '' ;
9595 output += ( res . ok ? 'ok ' : 'not ok ' ) + count ;
9696 output += res . name ? ' ' + res . name . toString ( ) . replace ( / \s + / g, ' ' ) : '' ;
97-
97+
9898 if ( res . skip ) output += ' # SKIP' ;
9999 else if ( res . todo ) output += ' # TODO' ;
100-
100+
101101 output += '\n' ;
102102 if ( res . ok ) return output ;
103-
103+
104104 var outer = ' ' ;
105105 var inner = outer + ' ' ;
106106 output += outer + '---\n' ;
107107 output += inner + 'operator: ' + res . operator + '\n' ;
108-
108+
109109 var ex = json . stringify ( res . expected , getSerialize ( ) ) || '' ;
110110 var ac = json . stringify ( res . actual , getSerialize ( ) ) || '' ;
111-
111+
112112 if ( Math . max ( ex . length , ac . length ) > 65 ) {
113113 output += inner + 'expected:\n' + inner + ' ' + ex + '\n' ;
114114 output += inner + 'actual:\n' + inner + ' ' + ac + '\n' ;
@@ -128,14 +128,14 @@ function encodeResult (res, count) {
128128 output += inner + lines [ i ] + '\n' ;
129129 }
130130 }
131-
131+
132132 output += outer + '...\n' ;
133133 return output ;
134134}
135135
136136function getSerialize ( ) {
137137 var seen = [ ] ;
138-
138+
139139 return function ( key , value ) {
140140 var ret = value ;
141141 if ( typeof value === 'object' && value ) {
@@ -146,7 +146,7 @@ function getSerialize () {
146146 break ;
147147 }
148148 }
149-
149+
150150 if ( found ) ret = '[Circular]'
151151 else seen . push ( value )
152152 }
@@ -158,7 +158,7 @@ function getNextTest(results) {
158158 if ( ! results . _only ) {
159159 return results . tests . shift ( ) ;
160160 }
161-
161+
162162 do {
163163 var t = results . tests . shift ( ) ;
164164 if ( ! t ) {
0 commit comments