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 1
1
'use strict' ;
2
- var common = require ( '../common' ) ;
3
- var assert = require ( 'assert' ) ;
2
+ const common = require ( '../common' ) ;
3
+ const assert = require ( 'assert' ) ;
4
4
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 ;
7
7
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' ) ;
10
10
11
- var cmd = '"' + nodePath + ' " "' + script + ' " | head -2' ;
11
+ const cmd = `" ${ nodePath } " "${ script } " | head -2` ;
12
12
13
13
exec ( 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 ) ;
17
17
} ) ) ;
You can’t perform that action at this time.
0 commit comments