11'use strict' ;
2- var common = require ( '../common' ) ;
3- var assert = require ( 'assert' ) ;
42
5- var spawn = require ( 'child_process' ) . spawn ;
3+ const common = require ( '../common' ) ;
4+ const assert = require ( 'assert' ) ;
65
7- var path = require ( 'path' ) ;
6+ const spawn = require ( 'child_process' ) . spawn ;
87
9- var sub = path . join ( common . fixturesDir , 'echo.js ') ;
8+ const path = require ( 'path ') ;
109
11- var gotHelloWorld = false ;
12- var gotEcho = false ;
10+ const sub = path . join ( common . fixturesDir , 'echo.js' ) ;
1311
14- var child = spawn ( process . argv [ 0 ] , [ sub ] ) ;
12+ let gotHelloWorld = false ;
13+ let gotEcho = false ;
14+
15+ const child = spawn ( process . argv [ 0 ] , [ sub ] ) ;
1516
1617child . stderr . on ( 'data' , function ( data ) {
1718 console . log ( 'parent stderr: ' + data ) ;
@@ -23,7 +24,7 @@ child.stdout.on('data', function(data) {
2324 console . log ( 'child said: ' + JSON . stringify ( data ) ) ;
2425 if ( ! gotHelloWorld ) {
2526 console . error ( 'testing for hello world' ) ;
26- assert . equal ( 'hello world\r\n' , data ) ;
27+ assert . strictEqual ( 'hello world\r\n' , data ) ;
2728 gotHelloWorld = true ;
2829 console . error ( 'writing echo me' ) ;
2930 child . stdin . write ( 'echo me\r\n' ) ;
0 commit comments