File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,10 @@ function actualString(test) {
3434}
3535
3636module . exports = through ( function ( data ) {
37- process . stdout . clearLine ( ) ;
38- process . stdout . cursorTo ( 0 ) ;
37+ if ( process . stdout . clearLine && process . stdout . cursorTo ) {
38+ process . stdout . clearLine ( ) ;
39+ process . stdout . cursorTo ( 0 ) ;
40+ }
3941
4042 if ( data . pass ) {
4143 state . pass ++ ;
@@ -49,8 +51,10 @@ module.exports = through(function(data) {
4951 " Got: " + actualString ( data ) + "\n\n" ) ;
5052 }
5153} , function ( ) {
52- process . stdout . clearLine ( ) ;
53- process . stdout . cursorTo ( 0 ) ;
54+ if ( process . stdout . clearLine && process . stdout . cursorTo ) {
55+ process . stdout . clearLine ( ) ;
56+ process . stdout . cursorTo ( 0 ) ;
57+ }
5458 console . log ( "Ran " + ( state . pass + state . fail ) + " tests" )
5559 console . log ( state . pass + " passed" )
5660 console . log ( state . fail + " failed" )
You can’t perform that action at this time.
0 commit comments