11'use strict' ;
2- var common = require ( '../../common' ) ;
3- var assert = require ( 'assert' ) ;
4- var repl = require ( 'repl' ) ;
5- var stream = require ( 'stream' ) ;
6- var path = require ( 'path' ) ;
7- var buildType = process . config . target_defaults . default_configuration ;
8- var buildPath = path . join ( __dirname , 'build' , buildType , 'binding' ) ;
2+ const common = require ( '../../common' ) ;
3+ const assert = require ( 'assert' ) ;
4+ const repl = require ( 'repl' ) ;
5+ const stream = require ( 'stream' ) ;
6+ const path = require ( 'path' ) ;
7+ const buildType = process . config . target_defaults . default_configuration ;
8+ let buildPath = path . join ( __dirname , 'build' , buildType , 'binding' ) ;
99// On Windows, escape backslashes in the path before passing it to REPL.
1010if ( common . isWindows )
1111 buildPath = buildPath . replace ( / \\ / g, '/' ) ;
12- var cb_ran = false ;
12+ let cb_ran = false ;
1313
1414process . on ( 'exit' , function ( ) {
1515 assert ( cb_ran ) ;
1616 console . log ( 'ok' ) ;
1717} ) ;
1818
19- var lines = [
19+ const lines = [
2020 // This line shouldn't cause an assertion error.
2121 'require(\'' + buildPath + '\')' +
2222 // Log output to double check callback ran.
2323 '.method(function() { console.log(\'cb_ran\'); });' ,
2424] ;
2525
26- var dInput = new stream . Readable ( ) ;
27- var dOutput = new stream . Writable ( ) ;
26+ const dInput = new stream . Readable ( ) ;
27+ const dOutput = new stream . Writable ( ) ;
2828
2929dInput . _read = function _read ( size ) {
3030 while ( lines . length > 0 && this . push ( lines . shift ( ) ) ) ;
@@ -38,7 +38,7 @@ dOutput._write = function _write(chunk, encoding, cb) {
3838 cb ( ) ;
3939} ;
4040
41- var options = {
41+ const options = {
4242 input : dInput ,
4343 output : dOutput ,
4444 terminal : false ,
0 commit comments