11/* eslint-disable max-len, strict */
2- var common = require ( '../common' ) ;
3- var assert = require ( 'assert' ) ;
2+ const common = require ( '../common' ) ;
3+ const assert = require ( 'assert' ) ;
44
55common . globalCheck = false ;
66common . refreshTmpDir ( ) ;
@@ -15,11 +15,11 @@ const prompt_npm = 'npm should be run outside of the ' +
1515 'node repl, in your normal shell.\n' +
1616 '(Press Control-D to exit.)\n' ;
1717const expect_npm = prompt_npm + prompt_unix ;
18- var server_tcp , server_unix , client_tcp , client_unix , replServer ;
18+ let server_tcp , server_unix , client_tcp , client_unix , replServer ;
1919
2020
2121// absolute path to test/fixtures/a.js
22- var moduleFilename = require ( 'path' ) . join ( common . fixturesDir , 'a' ) ;
22+ const moduleFilename = require ( 'path' ) . join ( common . fixturesDir , 'a' ) ;
2323
2424console . error ( 'repl test' ) ;
2525
@@ -30,7 +30,7 @@ global.invoke_me = function(arg) {
3030
3131function send_expect ( list ) {
3232 if ( list . length > 0 ) {
33- var cur = list . shift ( ) ;
33+ const cur = list . shift ( ) ;
3434
3535 console . error ( 'sending ' + JSON . stringify ( cur . send ) ) ;
3636
@@ -56,8 +56,8 @@ function strict_mode_error_test() {
5656
5757function error_test ( ) {
5858 // The other stuff is done so reuse unix socket
59- var read_buffer = '' ;
60- var run_strict_test = true ;
59+ let read_buffer = '' ;
60+ let run_strict_test = true ;
6161 client_unix . removeAllListeners ( 'data' ) ;
6262
6363 client_unix . on ( 'data' , function ( data ) {
@@ -70,7 +70,7 @@ function error_test() {
7070 if ( read_buffer . indexOf ( prompt_unix ) !== - 1 ) {
7171 // if it's an exact match, then don't do the regexp
7272 if ( read_buffer !== client_unix . expect ) {
73- var expect = client_unix . expect ;
73+ let expect = client_unix . expect ;
7474 if ( expect === prompt_multiline )
7575 expect = / [ \. ] { 3 } / ;
7676 assert . ok ( read_buffer . match ( expect ) ) ;
@@ -354,13 +354,13 @@ function tcp_test() {
354354 } ) ;
355355
356356 server_tcp . listen ( 0 , function ( ) {
357- var read_buffer = '' ;
357+ let read_buffer = '' ;
358358
359359 client_tcp = net . createConnection ( this . address ( ) . port ) ;
360360
361361 client_tcp . on ( 'connect' , function ( ) {
362- assert . equal ( true , client_tcp . readable ) ;
363- assert . equal ( true , client_tcp . writable ) ;
362+ assert . strictEqual ( true , client_tcp . readable ) ;
363+ assert . strictEqual ( true , client_tcp . writable ) ;
364364
365365 send_expect ( [
366366 { client : client_tcp , send : '' ,
@@ -423,13 +423,13 @@ function unix_test() {
423423 } ) ;
424424
425425 server_unix . on ( 'listening' , function ( ) {
426- var read_buffer = '' ;
426+ let read_buffer = '' ;
427427
428428 client_unix = net . createConnection ( common . PIPE ) ;
429429
430430 client_unix . on ( 'connect' , function ( ) {
431- assert . equal ( true , client_unix . readable ) ;
432- assert . equal ( true , client_unix . writable ) ;
431+ assert . strictEqual ( true , client_unix . readable ) ;
432+ assert . strictEqual ( true , client_unix . writable ) ;
433433
434434 send_expect ( [
435435 { client : client_unix , send : '' ,
0 commit comments