File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
2- var common = require ( '../common' ) ;
3- var assert = require ( 'assert' ) ;
2+ const common = require ( '../common' ) ;
3+ const assert = require ( 'assert' ) ;
44
5- var exec = require ( 'child_process' ) . exec ;
6- var join = require ( 'path' ) . join ;
5+ const exec = require ( 'child_process' ) . exec ;
6+ const join = require ( 'path' ) . join ;
77
8- var nodePath = process . argv [ 0 ] ;
9- var script = join ( common . fixturesDir , 'print-10-lines.js' ) ;
8+ const nodePath = process . argv [ 0 ] ;
9+ const script = join ( common . fixturesDir , 'print-10-lines.js' ) ;
1010
11- var cmd = '"' + nodePath + ' " "' + script + ' " | head -2' ;
11+ const cmd = `" ${ nodePath } " "${ script } " | head -2` ;
1212
1313exec ( cmd , common . mustCall ( function ( err , stdout , stderr ) {
14- if ( err ) throw err ;
15- var lines = stdout . split ( '\n' ) ;
16- assert . equal ( 3 , lines . length ) ;
14+ assert . ifError ( err ) ;
15+ const lines = stdout . split ( '\n' ) ;
16+ assert . strictEqual ( 3 , lines . length ) ;
1717} ) ) ;
You can’t perform that action at this time.
0 commit comments