@@ -67,8 +67,6 @@ for (const isolation of ['none', 'process']) {
67
67
`--experimental-${ type } -types` , `--experimental-test-isolation=${ isolation } ` ] ;
68
68
const child = spawnSync ( process . execPath , args , { cwd : join ( testFixtures , 'matching-patterns' ) } ) ;
69
69
70
- assert . strictEqual ( child . status , 0 ) ;
71
- assert . strictEqual ( child . signal , null ) ;
72
70
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
73
71
const stdout = child . stdout . toString ( ) ;
74
72
@@ -78,6 +76,8 @@ for (const isolation of ['none', 'process']) {
78
76
assert . match ( stdout , / o k 4 - t h i s s h o u l d p a s s / ) ;
79
77
assert . match ( stdout , / o k 5 - t h i s s h o u l d p a s s / ) ;
80
78
assert . match ( stdout , / o k 6 - t h i s s h o u l d p a s s / ) ;
79
+ assert . strictEqual ( child . status , 0 ) ;
80
+ assert . strictEqual ( child . signal , null ) ;
81
81
}
82
82
83
83
{
@@ -97,9 +97,9 @@ for (const isolation of ['none', 'process']) {
97
97
assert . match ( stdout , / o k 4 - t h i s s h o u l d p a s s / ) ;
98
98
assert . match ( stdout , / o k 5 - t h i s s h o u l d b e s k i p p e d / ) ;
99
99
assert . match ( stdout , / o k 6 - t h i s s h o u l d b e e x e c u t e d / ) ;
100
+ assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
100
101
assert . strictEqual ( child . status , 1 ) ;
101
102
assert . strictEqual ( child . signal , null ) ;
102
- assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
103
103
}
104
104
105
105
{
@@ -112,11 +112,11 @@ for (const isolation of ['none', 'process']) {
112
112
] ;
113
113
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
114
114
115
- assert . strictEqual ( child . status , 1 ) ;
116
- assert . strictEqual ( child . signal , null ) ;
117
115
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
118
116
const stdout = child . stdout . toString ( ) ;
119
117
assert . match ( stdout , / n o t o k 1 - .+ i n d e x \. j s / ) ;
118
+ assert . strictEqual ( child . status , 1 ) ;
119
+ assert . strictEqual ( child . signal , null ) ;
120
120
}
121
121
122
122
{
@@ -129,11 +129,11 @@ for (const isolation of ['none', 'process']) {
129
129
] ;
130
130
const child = spawnSync ( process . execPath , args ) ;
131
131
132
- assert . strictEqual ( child . status , 1 ) ;
133
- assert . strictEqual ( child . signal , null ) ;
134
132
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
135
133
const stdout = child . stdout . toString ( ) ;
136
134
assert . match ( stdout , / n o t o k 1 - .+ t e s t - n m \. j s / ) ;
135
+ assert . strictEqual ( child . status , 1 ) ;
136
+ assert . strictEqual ( child . signal , null ) ;
137
137
}
138
138
139
139
{
@@ -142,8 +142,6 @@ for (const isolation of ['none', 'process']) {
142
142
const options = { cwd : join ( testFixtures , 'default-behavior' ) } ;
143
143
const child = spawnSync ( process . execPath , args , options ) ;
144
144
145
- assert . strictEqual ( child . status , 1 ) ;
146
- assert . strictEqual ( child . signal , null ) ;
147
145
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
148
146
const stdout = child . stdout . toString ( ) ;
149
147
assert . match ( stdout , / t h i s s h o u l d p a s s / ) ;
@@ -152,6 +150,9 @@ for (const isolation of ['none', 'process']) {
152
150
assert . match ( stdout , / t h i s s h o u l d p a s s / ) ;
153
151
assert . match ( stdout , / t h i s s h o u l d b e s k i p p e d / ) ;
154
152
assert . match ( stdout , / t h i s s h o u l d b e e x e c u t e d / ) ;
153
+
154
+ assert . strictEqual ( child . status , 1 ) ;
155
+ assert . strictEqual ( child . signal , null ) ;
155
156
}
156
157
157
158
{
@@ -166,8 +167,6 @@ for (const isolation of ['none', 'process']) {
166
167
] ;
167
168
const child = spawnSync ( process . execPath , args ) ;
168
169
169
- assert . strictEqual ( child . status , 1 ) ;
170
- assert . strictEqual ( child . signal , null ) ;
171
170
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
172
171
const stdout = child . stdout . toString ( ) ;
173
172
assert . match ( stdout , / # S u b t e s t : t h i s s h o u l d p a s s / ) ;
@@ -204,6 +203,9 @@ for (const isolation of ['none', 'process']) {
204
203
assert . match ( stdout , / # c a n c e l l e d 0 / ) ;
205
204
assert . match ( stdout , / # s k i p p e d 1 / ) ;
206
205
assert . match ( stdout , / # t o d o 0 / ) ;
206
+
207
+ assert . strictEqual ( child . status , 1 ) ;
208
+ assert . strictEqual ( child . signal , null ) ;
207
209
}
208
210
}
209
211
@@ -219,11 +221,11 @@ for (const isolation of ['none', 'process']) {
219
221
for ( const args of flags ) {
220
222
const child = spawnSync ( process . execPath , args ) ;
221
223
222
- assert . notStrictEqual ( child . status , 0 ) ;
223
- assert . strictEqual ( child . signal , null ) ;
224
224
assert . strictEqual ( child . stdout . toString ( ) , '' ) ;
225
225
const stderr = child . stderr . toString ( ) ;
226
226
assert . match ( stderr , / - - t e s t / ) ;
227
+ assert . notStrictEqual ( child . status , 0 ) ;
228
+ assert . strictEqual ( child . signal , null ) ;
227
229
}
228
230
}
229
231
@@ -236,8 +238,6 @@ for (const isolation of ['none', 'process']) {
236
238
] ;
237
239
const child = spawnSync ( process . execPath , args ) ;
238
240
239
- assert . strictEqual ( child . status , 0 ) ;
240
- assert . strictEqual ( child . signal , null ) ;
241
241
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
242
242
const stdout = child . stdout . toString ( ) ;
243
243
assert . match ( stdout , / # s t d e r r 1 / ) ;
@@ -251,6 +251,9 @@ for (const isolation of ['none', 'process']) {
251
251
assert . match ( stdout , / o k 1 - a t e s t / ) ;
252
252
assert . match ( stdout , / # t e s t s 1 / ) ;
253
253
assert . match ( stdout , / # p a s s 1 / ) ;
254
+
255
+ assert . strictEqual ( child . status , 0 ) ;
256
+ assert . strictEqual ( child . signal , null ) ;
254
257
}
255
258
256
259
{
@@ -263,70 +266,70 @@ for (const isolation of ['none', 'process']) {
263
266
const child = spawnSync ( process . execPath , args ) ;
264
267
265
268
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
266
- assert . strictEqual ( child . status , 0 ) ;
267
- assert . strictEqual ( child . signal , null ) ;
268
269
const stdout = child . stdout . toString ( ) ;
269
270
assert . match ( stdout , / t h i s s h o u l d p a s s / ) ;
271
+ assert . strictEqual ( child . status , 0 ) ;
272
+ assert . strictEqual ( child . signal , null ) ;
270
273
}
271
274
272
275
{
273
276
// --test-shard option validation
274
277
const args = [ '--test' , '--test-shard=1' , join ( testFixtures , 'index.js' ) ] ;
275
278
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
276
279
277
- assert . strictEqual ( child . status , 1 ) ;
278
- assert . strictEqual ( child . signal , null ) ;
279
280
assert . match ( child . stderr . toString ( ) , / T h e a r g u m e n t ' - - t e s t - s h a r d ' m u s t b e i n t h e f o r m o f < i n d e x > \/ < t o t a l > \. R e c e i v e d ' 1 ' / ) ;
280
281
const stdout = child . stdout . toString ( ) ;
281
282
assert . strictEqual ( stdout , '' ) ;
283
+ assert . strictEqual ( child . status , 1 ) ;
284
+ assert . strictEqual ( child . signal , null ) ;
282
285
}
283
286
284
287
{
285
288
// --test-shard option validation
286
289
const args = [ '--test' , '--test-shard=1/2/3' , join ( testFixtures , 'index.js' ) ] ;
287
290
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
288
291
289
- assert . strictEqual ( child . status , 1 ) ;
290
- assert . strictEqual ( child . signal , null ) ;
291
292
assert . match ( child . stderr . toString ( ) , / T h e a r g u m e n t ' - - t e s t - s h a r d ' m u s t b e i n t h e f o r m o f < i n d e x > \/ < t o t a l > \. R e c e i v e d ' 1 \/ 2 \/ 3 ' / ) ;
292
293
const stdout = child . stdout . toString ( ) ;
293
294
assert . strictEqual ( stdout , '' ) ;
295
+ assert . strictEqual ( child . status , 1 ) ;
296
+ assert . strictEqual ( child . signal , null ) ;
294
297
}
295
298
296
299
{
297
300
// --test-shard option validation
298
301
const args = [ '--test' , '--test-shard=0/3' , join ( testFixtures , 'index.js' ) ] ;
299
302
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
300
303
301
- assert . strictEqual ( child . status , 1 ) ;
302
- assert . strictEqual ( child . signal , null ) ;
303
304
assert . match ( child . stderr . toString ( ) , / T h e v a l u e o f " o p t i o n s \. s h a r d \. i n d e x " i s o u t o f r a n g e \. I t m u s t b e > = 1 & & < = 3 \. R e c e i v e d 0 / ) ;
304
305
const stdout = child . stdout . toString ( ) ;
305
306
assert . strictEqual ( stdout , '' ) ;
307
+ assert . strictEqual ( child . status , 1 ) ;
308
+ assert . strictEqual ( child . signal , null ) ;
306
309
}
307
310
308
311
{
309
312
// --test-shard option validation
310
313
const args = [ '--test' , '--test-shard=0xf/20abcd' , join ( testFixtures , 'index.js' ) ] ;
311
314
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
312
315
313
- assert . strictEqual ( child . status , 1 ) ;
314
- assert . strictEqual ( child . signal , null ) ;
315
316
assert . match ( child . stderr . toString ( ) , / T h e a r g u m e n t ' - - t e s t - s h a r d ' m u s t b e i n t h e f o r m o f < i n d e x > \/ < t o t a l > \. R e c e i v e d ' 0 x f \/ 2 0 a b c d ' / ) ;
316
317
const stdout = child . stdout . toString ( ) ;
317
318
assert . strictEqual ( stdout , '' ) ;
319
+ assert . strictEqual ( child . status , 1 ) ;
320
+ assert . strictEqual ( child . signal , null ) ;
318
321
}
319
322
320
323
{
321
324
// --test-shard option validation
322
325
const args = [ '--test' , '--test-shard=hello' , join ( testFixtures , 'index.js' ) ] ;
323
326
const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
324
327
325
- assert . strictEqual ( child . status , 1 ) ;
326
- assert . strictEqual ( child . signal , null ) ;
327
328
assert . match ( child . stderr . toString ( ) , / T h e a r g u m e n t ' - - t e s t - s h a r d ' m u s t b e i n t h e f o r m o f < i n d e x > \/ < t o t a l > \. R e c e i v e d ' h e l l o ' / ) ;
328
329
const stdout = child . stdout . toString ( ) ;
329
330
assert . strictEqual ( stdout , '' ) ;
331
+ assert . strictEqual ( child . status , 1 ) ;
332
+ assert . strictEqual ( child . signal , null ) ;
330
333
}
331
334
332
335
{
@@ -339,8 +342,6 @@ for (const isolation of ['none', 'process']) {
339
342
] ;
340
343
const child = spawnSync ( process . execPath , args ) ;
341
344
342
- assert . strictEqual ( child . status , 0 ) ;
343
- assert . strictEqual ( child . signal , null ) ;
344
345
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
345
346
const stdout = child . stdout . toString ( ) ;
346
347
assert . match ( stdout , / # S u b t e s t : a \. c j s t h i s s h o u l d p a s s / ) ;
@@ -362,6 +363,9 @@ for (const isolation of ['none', 'process']) {
362
363
assert . match ( stdout , / # p a s s 5 / ) ;
363
364
assert . match ( stdout , / # f a i l 0 / ) ;
364
365
assert . match ( stdout , / # s k i p p e d 0 / ) ;
366
+
367
+ assert . strictEqual ( child . status , 0 ) ;
368
+ assert . strictEqual ( child . signal , null ) ;
365
369
}
366
370
367
371
{
@@ -374,8 +378,6 @@ for (const isolation of ['none', 'process']) {
374
378
] ;
375
379
const child = spawnSync ( process . execPath , args ) ;
376
380
377
- assert . strictEqual ( child . status , 0 ) ;
378
- assert . strictEqual ( child . signal , null ) ;
379
381
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
380
382
const stdout = child . stdout . toString ( ) ;
381
383
assert . match ( stdout , / # S u b t e s t : b \. c j s t h i s s h o u l d p a s s / ) ;
@@ -397,15 +399,16 @@ for (const isolation of ['none', 'process']) {
397
399
assert . match ( stdout , / # p a s s 5 / ) ;
398
400
assert . match ( stdout , / # f a i l 0 / ) ;
399
401
assert . match ( stdout , / # s k i p p e d 0 / ) ;
402
+
403
+ assert . strictEqual ( child . status , 0 ) ;
404
+ assert . strictEqual ( child . signal , null ) ;
400
405
}
401
406
402
407
{
403
408
// Should not match files like latest.js
404
409
const args = [ '--test' , '--test-reporter=tap' ] ;
405
410
const child = spawnSync ( process . execPath , args , { cwd : join ( testFixtures , 'issue-54726' ) } ) ;
406
411
407
- assert . strictEqual ( child . status , 0 ) ;
408
- assert . strictEqual ( child . signal , null ) ;
409
412
assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
410
413
const stdout = child . stdout . toString ( ) ;
411
414
@@ -416,4 +419,7 @@ for (const isolation of ['none', 'process']) {
416
419
assert . match ( stdout , / c a n c e l l e d 0 / ) ;
417
420
assert . match ( stdout , / s k i p p e d 0 / ) ;
418
421
assert . match ( stdout , / t o d o 0 / ) ;
422
+
423
+ assert . strictEqual ( child . status , 0 ) ;
424
+ assert . strictEqual ( child . signal , null ) ;
419
425
}
0 commit comments