@@ -32,27 +32,27 @@ const fixtureD = fixture('define-global.js');
32
32
const fixtureThrows = fixture ( 'throws_error4.js' ) ;
33
33
34
34
// test preloading a single module works
35
- childProcess . exec ( nodeBinary + ' '
36
- + preloadOption ( [ fixtureA ] ) + ' '
37
- + fixtureB ,
35
+ childProcess . exec ( nodeBinary + ' ' +
36
+ preloadOption ( [ fixtureA ] ) + ' ' +
37
+ fixtureB ,
38
38
function ( err , stdout , stderr ) {
39
39
if ( err ) throw err ;
40
40
assert . strictEqual ( stdout , 'A\nB\n' ) ;
41
41
} ) ;
42
42
43
43
// test preloading multiple modules works
44
- childProcess . exec ( nodeBinary + ' '
45
- + preloadOption ( [ fixtureA , fixtureB ] ) + ' '
46
- + fixtureC ,
44
+ childProcess . exec ( nodeBinary + ' ' +
45
+ preloadOption ( [ fixtureA , fixtureB ] ) + ' ' +
46
+ fixtureC ,
47
47
function ( err , stdout , stderr ) {
48
48
if ( err ) throw err ;
49
49
assert . strictEqual ( stdout , 'A\nB\nC\n' ) ;
50
50
} ) ;
51
51
52
52
// test that preloading a throwing module aborts
53
- childProcess . exec ( nodeBinary + ' '
54
- + preloadOption ( [ fixtureA , fixtureThrows ] ) + ' '
55
- + fixtureB ,
53
+ childProcess . exec ( nodeBinary + ' ' +
54
+ preloadOption ( [ fixtureA , fixtureThrows ] ) + ' ' +
55
+ fixtureB ,
56
56
function ( err , stdout , stderr ) {
57
57
if ( err ) {
58
58
assert . strictEqual ( stdout , 'A\n' ) ;
@@ -62,9 +62,9 @@ childProcess.exec(nodeBinary + ' '
62
62
} ) ;
63
63
64
64
// test that preload can be used with --eval
65
- childProcess . exec ( nodeBinary + ' '
66
- + preloadOption ( [ fixtureA ] )
67
- + '-e "console.log(\'hello\');"' ,
65
+ childProcess . exec ( nodeBinary + ' ' +
66
+ preloadOption ( [ fixtureA ] ) +
67
+ '-e "console.log(\'hello\');"' ,
68
68
function ( err , stdout , stderr ) {
69
69
if ( err ) throw err ;
70
70
assert . strictEqual ( stdout , 'A\nhello\n' ) ;
@@ -108,19 +108,19 @@ replProc.on('close', function(code) {
108
108
109
109
// test that preload placement at other points in the cmdline
110
110
// also test that duplicated preload only gets loaded once
111
- childProcess . exec ( nodeBinary + ' '
112
- + preloadOption ( [ fixtureA ] )
113
- + '-e "console.log(\'hello\');" '
114
- + preloadOption ( [ fixtureA , fixtureB ] ) ,
111
+ childProcess . exec ( nodeBinary + ' ' +
112
+ preloadOption ( [ fixtureA ] ) +
113
+ '-e "console.log(\'hello\');" ' +
114
+ preloadOption ( [ fixtureA , fixtureB ] ) ,
115
115
function ( err , stdout , stderr ) {
116
116
if ( err ) throw err ;
117
117
assert . strictEqual ( stdout , 'A\nB\nhello\n' ) ;
118
118
} ) ;
119
119
120
120
// test that preload works with -i
121
- const interactive = childProcess . exec ( nodeBinary + ' '
122
- + preloadOption ( [ fixtureD ] )
123
- + '-i' ,
121
+ const interactive = childProcess . exec ( nodeBinary + ' ' +
122
+ preloadOption ( [ fixtureD ] ) +
123
+ '-i' ,
124
124
common . mustCall ( function ( err , stdout , stderr ) {
125
125
assert . ifError ( err ) ;
126
126
assert . strictEqual ( stdout , "> 'test'\n> " ) ;
@@ -129,20 +129,20 @@ const interactive = childProcess.exec(nodeBinary + ' '
129
129
interactive . stdin . write ( 'a\n' ) ;
130
130
interactive . stdin . write ( 'process.exit()\n' ) ;
131
131
132
- childProcess . exec ( nodeBinary + ' '
133
- + '--require ' + fixture ( 'cluster-preload.js' ) + ' '
134
- + fixture ( 'cluster-preload-test.js' ) ,
132
+ childProcess . exec ( nodeBinary + ' ' +
133
+ '--require ' + fixture ( 'cluster-preload.js' ) + ' ' +
134
+ fixture ( 'cluster-preload-test.js' ) ,
135
135
function ( err , stdout , stderr ) {
136
136
if ( err ) throw err ;
137
137
assert . ok ( / w o r k e r t e r m i n a t e d w i t h c o d e 4 3 / . test ( stdout ) ) ;
138
138
} ) ;
139
139
140
140
// https://github.com/nodejs/node/issues/1691
141
141
process . chdir ( common . fixturesDir ) ;
142
- childProcess . exec ( nodeBinary + ' '
143
- + '--expose_debug_as=v8debug '
144
- + '--require ' + fixture ( 'cluster-preload.js' ) + ' '
145
- + 'cluster-preload-test.js' ,
142
+ childProcess . exec ( nodeBinary + ' ' +
143
+ '--expose_debug_as=v8debug ' +
144
+ '--require ' + fixture ( 'cluster-preload.js' ) + ' ' +
145
+ 'cluster-preload-test.js' ,
146
146
function ( err , stdout , stderr ) {
147
147
if ( err ) throw err ;
148
148
assert . ok ( / w o r k e r t e r m i n a t e d w i t h c o d e 4 3 / . test ( stdout ) ) ;
0 commit comments