@@ -18,56 +18,56 @@ const {
18
18
19
19
throws ( ( ) => exec ( `${ process . execPath } ${ __filename } AAA BBB\0XXX CCC` , mustNotCall ( ) ) , {
20
20
code : 'ERR_INVALID_ARG_VALUE' ,
21
- message : / T h e a r g u m e n t ' c o m m a n d ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
21
+ name : 'TypeError' ,
22
22
} ) ;
23
23
24
24
throws ( ( ) => exec ( 'BBB\0XXX AAA CCC' , mustNotCall ( ) ) , {
25
25
code : 'ERR_INVALID_ARG_VALUE' ,
26
- message : / T h e a r g u m e n t ' c o m m a n d ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
26
+ name : 'TypeError' ,
27
27
} ) ;
28
28
29
29
throws ( ( ) => execSync ( `${ process . execPath } ${ __filename } AAA BBB\0XXX CCC` ) , {
30
30
code : 'ERR_INVALID_ARG_VALUE' ,
31
- message : / T h e a r g u m e n t ' c o m m a n d ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
31
+ name : 'TypeError' ,
32
32
} ) ;
33
33
34
34
throws ( ( ) => execSync ( 'BBB\0XXX AAA CCC' ) , {
35
35
code : 'ERR_INVALID_ARG_VALUE' ,
36
- message : / T h e a r g u m e n t ' c o m m a n d ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
36
+ name : 'TypeError' ,
37
37
} ) ;
38
38
39
39
// Tests for the 'file' argument
40
40
41
41
throws ( ( ) => spawn ( 'BBB\0XXX' ) , {
42
42
code : 'ERR_INVALID_ARG_VALUE' ,
43
- message : / T h e a r g u m e n t ' f i l e ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
43
+ name : 'TypeError' ,
44
44
} ) ;
45
45
46
46
throws ( ( ) => execFile ( 'BBB\0XXX' , mustNotCall ( ) ) , {
47
47
code : 'ERR_INVALID_ARG_VALUE' ,
48
- message : / T h e a r g u m e n t ' f i l e ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
48
+ name : 'TypeError' ,
49
49
} ) ;
50
50
51
51
throws ( ( ) => execFileSync ( 'BBB\0XXX' ) , {
52
52
code : 'ERR_INVALID_ARG_VALUE' ,
53
- message : / T h e a r g u m e n t ' f i l e ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
53
+ name : 'TypeError' ,
54
54
} ) ;
55
55
56
56
throws ( ( ) => spawn ( 'BBB\0XXX' ) , {
57
57
code : 'ERR_INVALID_ARG_VALUE' ,
58
- message : / T h e a r g u m e n t ' f i l e ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
58
+ name : 'TypeError' ,
59
59
} ) ;
60
60
61
61
throws ( ( ) => spawnSync ( 'BBB\0XXX' ) , {
62
62
code : 'ERR_INVALID_ARG_VALUE' ,
63
- message : / T h e a r g u m e n t ' f i l e ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
63
+ name : 'TypeError' ,
64
64
} ) ;
65
65
66
66
// Tests for the 'modulePath' argument
67
67
68
68
throws ( ( ) => fork ( 'BBB\0XXX' ) , {
69
69
code : 'ERR_INVALID_ARG_VALUE' ,
70
- message : / T h e a r g u m e n t ' m o d u l e P a t h ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
70
+ name : 'TypeError' ,
71
71
} ) ;
72
72
73
73
// Tests for the 'args' argument
@@ -77,218 +77,218 @@ throws(() => fork('BBB\0XXX'), {
77
77
78
78
throws ( ( ) => execFile ( process . execPath , [ __filename , 'AAA' , 'BBB\0XXX' , 'CCC' ] , mustNotCall ( ) ) , {
79
79
code : 'ERR_INVALID_ARG_VALUE' ,
80
- message : / T h e a r g u m e n t ' a r g s \[ 2 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
80
+ name : 'TypeError' ,
81
81
} ) ;
82
82
83
83
throws ( ( ) => execFileSync ( process . execPath , [ __filename , 'AAA' , 'BBB\0XXX' , 'CCC' ] ) , {
84
84
code : 'ERR_INVALID_ARG_VALUE' ,
85
- message : / T h e a r g u m e n t ' a r g s \[ 2 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
85
+ name : 'TypeError' ,
86
86
} ) ;
87
87
88
88
throws ( ( ) => fork ( __filename , [ 'AAA' , 'BBB\0XXX' , 'CCC' ] ) , {
89
89
code : 'ERR_INVALID_ARG_VALUE' ,
90
- message : / T h e a r g u m e n t ' a r g s \[ 2 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
90
+ name : 'TypeError' ,
91
91
} ) ;
92
92
93
93
throws ( ( ) => spawn ( process . execPath , [ __filename , 'AAA' , 'BBB\0XXX' , 'CCC' ] ) , {
94
94
code : 'ERR_INVALID_ARG_VALUE' ,
95
- message : / T h e a r g u m e n t ' a r g s \[ 2 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
95
+ name : 'TypeError' ,
96
96
} ) ;
97
97
98
98
throws ( ( ) => spawnSync ( process . execPath , [ __filename , 'AAA' , 'BBB\0XXX' , 'CCC' ] ) , {
99
99
code : 'ERR_INVALID_ARG_VALUE' ,
100
- message : / T h e a r g u m e n t ' a r g s \[ 2 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
100
+ name : 'TypeError' ,
101
101
} ) ;
102
102
103
103
// Tests for the 'options.cwd' argument
104
104
105
105
throws ( ( ) => exec ( process . execPath , { cwd : 'BBB\0XXX' } , mustNotCall ( ) ) , {
106
106
code : 'ERR_INVALID_ARG_VALUE' ,
107
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
107
+ name : 'TypeError' ,
108
108
} ) ;
109
109
110
110
throws ( ( ) => execFile ( process . execPath , { cwd : 'BBB\0XXX' } , mustNotCall ( ) ) , {
111
111
code : 'ERR_INVALID_ARG_VALUE' ,
112
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
112
+ name : 'TypeError' ,
113
113
} ) ;
114
114
115
115
throws ( ( ) => execFileSync ( process . execPath , { cwd : 'BBB\0XXX' } ) , {
116
116
code : 'ERR_INVALID_ARG_VALUE' ,
117
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
117
+ name : 'TypeError' ,
118
118
} ) ;
119
119
120
120
throws ( ( ) => execSync ( process . execPath , { cwd : 'BBB\0XXX' } ) , {
121
121
code : 'ERR_INVALID_ARG_VALUE' ,
122
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
122
+ name : 'TypeError' ,
123
123
} ) ;
124
124
125
125
throws ( ( ) => fork ( __filename , { cwd : 'BBB\0XXX' } ) , {
126
126
code : 'ERR_INVALID_ARG_VALUE' ,
127
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
127
+ name : 'TypeError' ,
128
128
} ) ;
129
129
130
130
throws ( ( ) => spawn ( process . execPath , { cwd : 'BBB\0XXX' } ) , {
131
131
code : 'ERR_INVALID_ARG_VALUE' ,
132
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
132
+ name : 'TypeError' ,
133
133
} ) ;
134
134
135
135
throws ( ( ) => spawnSync ( process . execPath , { cwd : 'BBB\0XXX' } ) , {
136
136
code : 'ERR_INVALID_ARG_VALUE' ,
137
- message : / T h e p r o p e r t y ' o p t i o n s \. c w d ' m u s t b e a s t r i n g o r U i n t 8 A r r a y w i t h o u t n u l l b y t e s /
137
+ name : 'TypeError' ,
138
138
} ) ;
139
139
140
140
// Tests for the 'options.argv0' argument
141
141
142
142
throws ( ( ) => exec ( process . execPath , { argv0 : 'BBB\0XXX' } , mustNotCall ( ) ) , {
143
143
code : 'ERR_INVALID_ARG_VALUE' ,
144
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
144
+ name : 'TypeError' ,
145
145
} ) ;
146
146
147
147
throws ( ( ) => execFile ( process . execPath , { argv0 : 'BBB\0XXX' } , mustNotCall ( ) ) , {
148
148
code : 'ERR_INVALID_ARG_VALUE' ,
149
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
149
+ name : 'TypeError' ,
150
150
} ) ;
151
151
152
152
throws ( ( ) => execFileSync ( process . execPath , { argv0 : 'BBB\0XXX' } ) , {
153
153
code : 'ERR_INVALID_ARG_VALUE' ,
154
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
154
+ name : 'TypeError' ,
155
155
} ) ;
156
156
157
157
throws ( ( ) => execSync ( process . execPath , { argv0 : 'BBB\0XXX' } ) , {
158
158
code : 'ERR_INVALID_ARG_VALUE' ,
159
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
159
+ name : 'TypeError' ,
160
160
} ) ;
161
161
162
162
throws ( ( ) => fork ( __filename , { argv0 : 'BBB\0XXX' } ) , {
163
163
code : 'ERR_INVALID_ARG_VALUE' ,
164
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
164
+ name : 'TypeError' ,
165
165
} ) ;
166
166
167
167
throws ( ( ) => spawn ( process . execPath , { argv0 : 'BBB\0XXX' } ) , {
168
168
code : 'ERR_INVALID_ARG_VALUE' ,
169
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
169
+ name : 'TypeError' ,
170
170
} ) ;
171
171
172
172
throws ( ( ) => spawnSync ( process . execPath , { argv0 : 'BBB\0XXX' } ) , {
173
173
code : 'ERR_INVALID_ARG_VALUE' ,
174
- message : / T h e p r o p e r t y ' o p t i o n s \. a r g v 0 ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
174
+ name : 'TypeError' ,
175
175
} ) ;
176
176
177
177
// Tests for the 'options.shell' argument
178
178
179
179
throws ( ( ) => exec ( process . execPath , { shell : 'BBB\0XXX' } , mustNotCall ( ) ) , {
180
180
code : 'ERR_INVALID_ARG_VALUE' ,
181
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
181
+ name : 'TypeError' ,
182
182
} ) ;
183
183
184
184
throws ( ( ) => execFile ( process . execPath , { shell : 'BBB\0XXX' } , mustNotCall ( ) ) , {
185
185
code : 'ERR_INVALID_ARG_VALUE' ,
186
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
186
+ name : 'TypeError' ,
187
187
} ) ;
188
188
189
189
throws ( ( ) => execFileSync ( process . execPath , { shell : 'BBB\0XXX' } ) , {
190
190
code : 'ERR_INVALID_ARG_VALUE' ,
191
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
191
+ name : 'TypeError' ,
192
192
} ) ;
193
193
194
194
throws ( ( ) => execSync ( process . execPath , { shell : 'BBB\0XXX' } ) , {
195
195
code : 'ERR_INVALID_ARG_VALUE' ,
196
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
196
+ name : 'TypeError' ,
197
197
} ) ;
198
198
199
199
// Not testing fork() because it doesn't accept the shell option (internally it
200
200
// explicitly sets shell to false).
201
201
202
202
throws ( ( ) => spawn ( process . execPath , { shell : 'BBB\0XXX' } ) , {
203
203
code : 'ERR_INVALID_ARG_VALUE' ,
204
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
204
+ name : 'TypeError' ,
205
205
} ) ;
206
206
207
207
throws ( ( ) => spawnSync ( process . execPath , { shell : 'BBB\0XXX' } ) , {
208
208
code : 'ERR_INVALID_ARG_VALUE' ,
209
- message : / T h e p r o p e r t y ' o p t i o n s \. s h e l l ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
209
+ name : 'TypeError' ,
210
210
} ) ;
211
211
212
212
// Tests for the 'options.env' argument
213
213
214
214
throws ( ( ) => exec ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } , mustNotCall ( ) ) , {
215
215
code : 'ERR_INVALID_ARG_VALUE' ,
216
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
216
+ name : 'TypeError' ,
217
217
} ) ;
218
218
219
219
throws ( ( ) => exec ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } , mustNotCall ( ) ) , {
220
220
code : 'ERR_INVALID_ARG_VALUE' ,
221
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
221
+ name : 'TypeError' ,
222
222
} ) ;
223
223
224
224
throws ( ( ) => execFile ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } , mustNotCall ( ) ) , {
225
225
code : 'ERR_INVALID_ARG_VALUE' ,
226
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
226
+ name : 'TypeError' ,
227
227
} ) ;
228
228
229
229
throws ( ( ) => execFile ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } , mustNotCall ( ) ) , {
230
230
code : 'ERR_INVALID_ARG_VALUE' ,
231
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
231
+ name : 'TypeError' ,
232
232
} ) ;
233
233
234
234
throws ( ( ) => execFileSync ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } ) , {
235
235
code : 'ERR_INVALID_ARG_VALUE' ,
236
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
236
+ name : 'TypeError' ,
237
237
} ) ;
238
238
239
239
throws ( ( ) => execFileSync ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } ) , {
240
240
code : 'ERR_INVALID_ARG_VALUE' ,
241
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
241
+ name : 'TypeError' ,
242
242
} ) ;
243
243
244
244
throws ( ( ) => execSync ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } ) , {
245
245
code : 'ERR_INVALID_ARG_VALUE' ,
246
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
246
+ name : 'TypeError' ,
247
247
} ) ;
248
248
249
249
throws ( ( ) => execSync ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } ) , {
250
250
code : 'ERR_INVALID_ARG_VALUE' ,
251
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
251
+ name : 'TypeError' ,
252
252
} ) ;
253
253
254
254
throws ( ( ) => fork ( __filename , { env : { 'AAA' : 'BBB\0XXX' } } ) , {
255
255
code : 'ERR_INVALID_ARG_VALUE' ,
256
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
256
+ name : 'TypeError' ,
257
257
} ) ;
258
258
259
259
throws ( ( ) => fork ( __filename , { env : { 'BBB\0XXX' : 'AAA' } } ) , {
260
260
code : 'ERR_INVALID_ARG_VALUE' ,
261
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
261
+ name : 'TypeError' ,
262
262
} ) ;
263
263
264
264
throws ( ( ) => spawn ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } ) , {
265
265
code : 'ERR_INVALID_ARG_VALUE' ,
266
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
266
+ name : 'TypeError' ,
267
267
} ) ;
268
268
269
269
throws ( ( ) => spawn ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } ) , {
270
270
code : 'ERR_INVALID_ARG_VALUE' ,
271
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
271
+ name : 'TypeError' ,
272
272
} ) ;
273
273
274
274
throws ( ( ) => spawnSync ( process . execPath , { env : { 'AAA' : 'BBB\0XXX' } } ) , {
275
275
code : 'ERR_INVALID_ARG_VALUE' ,
276
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' A A A ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
276
+ name : 'TypeError' ,
277
277
} ) ;
278
278
279
279
throws ( ( ) => spawnSync ( process . execPath , { env : { 'BBB\0XXX' : 'AAA' } } ) , {
280
280
code : 'ERR_INVALID_ARG_VALUE' ,
281
- message : / T h e p r o p e r t y ' o p t i o n s \. e n v \[ ' B B B \0 X X X ' \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
281
+ name : 'TypeError' ,
282
282
} ) ;
283
283
284
284
// Tests for the 'options.execPath' argument
285
285
throws ( ( ) => fork ( __filename , { execPath : 'BBB\0XXX' } ) , {
286
286
code : 'ERR_INVALID_ARG_VALUE' ,
287
- message : / T h e p r o p e r t y ' o p t i o n s \. e x e c P a t h ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
287
+ name : 'TypeError' ,
288
288
} ) ;
289
289
290
290
// Tests for the 'options.execArgv' argument
291
291
throws ( ( ) => fork ( __filename , { execArgv : [ 'AAA' , 'BBB\0XXX' , 'CCC' ] } ) , {
292
292
code : 'ERR_INVALID_ARG_VALUE' ,
293
- message : / T h e p r o p e r t y ' o p t i o n s \. e x e c A r g v \[ 1 \] ' m u s t b e a s t r i n g w i t h o u t n u l l b y t e s /
293
+ name : 'TypeError' ,
294
294
} ) ;
0 commit comments