@@ -7,7 +7,6 @@ const REPL = require('repl');
77const assert = require ( 'assert' ) ;
88const fs = require ( 'fs' ) ;
99const os = require ( 'os' ) ;
10- const util = require ( 'util' ) ;
1110
1211if ( process . env . TERM === 'dumb' ) {
1312 common . skip ( 'skipping - dumb terminal' ) ;
@@ -39,11 +38,11 @@ class ActionStream extends stream.Stream {
3938 if ( typeof action === 'object' ) {
4039 this . emit ( 'keypress' , '' , action ) ;
4140 } else {
42- this . emit ( 'data' , ` ${ action } \n` ) ;
41+ this . emit ( 'data' , action ) ;
4342 }
4443 setImmediate ( doAction ) ;
4544 } ;
46- setImmediate ( doAction ) ;
45+ doAction ( ) ;
4746 }
4847 resume ( ) { }
4948 pause ( ) { }
@@ -95,10 +94,8 @@ const tests = [
9594 test : [ UP , '21' , ENTER , "'42'" , ENTER ] ,
9695 expected : [
9796 prompt ,
98- // TODO(BridgeAR): The line is refreshed too many times. The double prompt
99- // is redundant and can be optimized away.
100- '2' , '1' , '21\n' , prompt , prompt ,
101- "'" , '4' , '2' , "'" , "'42'\n" , prompt , prompt ,
97+ '2' , '1' , '21\n' , prompt ,
98+ "'" , '4' , '2' , "'" , "'42'\n" , prompt ,
10299 ] ,
103100 clean : false
104101 } ,
@@ -191,8 +188,6 @@ function runTest(assertCleaned) {
191188 const opts = tests . shift ( ) ;
192189 if ( ! opts ) return ; // All done
193190
194- console . log ( 'NEW' ) ;
195-
196191 if ( assertCleaned ) {
197192 try {
198193 assert . strictEqual ( fs . readFileSync ( defaultHistoryPath , 'utf8' ) , '' ) ;
@@ -218,7 +213,6 @@ function runTest(assertCleaned) {
218213 output : new stream . Writable ( {
219214 write ( chunk , _ , next ) {
220215 const output = chunk . toString ( ) ;
221- console . log ( 'INPUT' , util . inspect ( output ) ) ;
222216
223217 // Ignore escapes and blank lines
224218 if ( output . charCodeAt ( 0 ) === 27 || / ^ [ \r \n ] + $ / . test ( output ) )
0 commit comments