@@ -67,8 +67,6 @@ for (const isolation of ['none', 'process']) {
6767 `--experimental-${ type } -types` , `--experimental-test-isolation=${ isolation } ` ] ;
6868 const child = spawnSync ( process . execPath , args , { cwd : join ( testFixtures , 'matching-patterns' ) } ) ;
6969
70- assert . strictEqual ( child . status , 0 ) ;
71- assert . strictEqual ( child . signal , null ) ;
7270 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
7371 const stdout = child . stdout . toString ( ) ;
7472
@@ -78,6 +76,8 @@ for (const isolation of ['none', 'process']) {
7876 assert . match ( stdout , / o k 4 - t h i s s h o u l d p a s s / ) ;
7977 assert . match ( stdout , / o k 5 - t h i s s h o u l d p a s s / ) ;
8078 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 ) ;
8181 }
8282
8383 {
@@ -97,9 +97,9 @@ for (const isolation of ['none', 'process']) {
9797 assert . match ( stdout , / o k 4 - t h i s s h o u l d p a s s / ) ;
9898 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 / ) ;
9999 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 ( ) , '' ) ;
100101 assert . strictEqual ( child . status , 1 ) ;
101102 assert . strictEqual ( child . signal , null ) ;
102- assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
103103 }
104104
105105 {
@@ -112,11 +112,11 @@ for (const isolation of ['none', 'process']) {
112112 ] ;
113113 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
114114
115- assert . strictEqual ( child . status , 1 ) ;
116- assert . strictEqual ( child . signal , null ) ;
117115 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
118116 const stdout = child . stdout . toString ( ) ;
119117 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 ) ;
120120 }
121121
122122 {
@@ -129,11 +129,11 @@ for (const isolation of ['none', 'process']) {
129129 ] ;
130130 const child = spawnSync ( process . execPath , args ) ;
131131
132- assert . strictEqual ( child . status , 1 ) ;
133- assert . strictEqual ( child . signal , null ) ;
134132 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
135133 const stdout = child . stdout . toString ( ) ;
136134 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 ) ;
137137 }
138138
139139 {
@@ -142,8 +142,6 @@ for (const isolation of ['none', 'process']) {
142142 const options = { cwd : join ( testFixtures , 'default-behavior' ) } ;
143143 const child = spawnSync ( process . execPath , args , options ) ;
144144
145- assert . strictEqual ( child . status , 1 ) ;
146- assert . strictEqual ( child . signal , null ) ;
147145 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
148146 const stdout = child . stdout . toString ( ) ;
149147 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']) {
152150 assert . match ( stdout , / t h i s s h o u l d p a s s / ) ;
153151 assert . match ( stdout , / t h i s s h o u l d b e s k i p p e d / ) ;
154152 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 ) ;
155156 }
156157
157158 {
@@ -166,8 +167,6 @@ for (const isolation of ['none', 'process']) {
166167 ] ;
167168 const child = spawnSync ( process . execPath , args ) ;
168169
169- assert . strictEqual ( child . status , 1 ) ;
170- assert . strictEqual ( child . signal , null ) ;
171170 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
172171 const stdout = child . stdout . toString ( ) ;
173172 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']) {
204203 assert . match ( stdout , / # c a n c e l l e d 0 / ) ;
205204 assert . match ( stdout , / # s k i p p e d 1 / ) ;
206205 assert . match ( stdout , / # t o d o 0 / ) ;
206+
207+ assert . strictEqual ( child . status , 1 ) ;
208+ assert . strictEqual ( child . signal , null ) ;
207209 }
208210}
209211
@@ -219,11 +221,11 @@ for (const isolation of ['none', 'process']) {
219221 for ( const args of flags ) {
220222 const child = spawnSync ( process . execPath , args ) ;
221223
222- assert . notStrictEqual ( child . status , 0 ) ;
223- assert . strictEqual ( child . signal , null ) ;
224224 assert . strictEqual ( child . stdout . toString ( ) , '' ) ;
225225 const stderr = child . stderr . toString ( ) ;
226226 assert . match ( stderr , / - - t e s t / ) ;
227+ assert . notStrictEqual ( child . status , 0 ) ;
228+ assert . strictEqual ( child . signal , null ) ;
227229 }
228230}
229231
@@ -236,8 +238,6 @@ for (const isolation of ['none', 'process']) {
236238 ] ;
237239 const child = spawnSync ( process . execPath , args ) ;
238240
239- assert . strictEqual ( child . status , 0 ) ;
240- assert . strictEqual ( child . signal , null ) ;
241241 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
242242 const stdout = child . stdout . toString ( ) ;
243243 assert . match ( stdout , / # s t d e r r 1 / ) ;
@@ -251,6 +251,9 @@ for (const isolation of ['none', 'process']) {
251251 assert . match ( stdout , / o k 1 - a t e s t / ) ;
252252 assert . match ( stdout , / # t e s t s 1 / ) ;
253253 assert . match ( stdout , / # p a s s 1 / ) ;
254+
255+ assert . strictEqual ( child . status , 0 ) ;
256+ assert . strictEqual ( child . signal , null ) ;
254257}
255258
256259{
@@ -263,70 +266,70 @@ for (const isolation of ['none', 'process']) {
263266 const child = spawnSync ( process . execPath , args ) ;
264267
265268 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
266- assert . strictEqual ( child . status , 0 ) ;
267- assert . strictEqual ( child . signal , null ) ;
268269 const stdout = child . stdout . toString ( ) ;
269270 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 ) ;
270273}
271274
272275{
273276 // --test-shard option validation
274277 const args = [ '--test' , '--test-shard=1' , join ( testFixtures , 'index.js' ) ] ;
275278 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
276279
277- assert . strictEqual ( child . status , 1 ) ;
278- assert . strictEqual ( child . signal , null ) ;
279280 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 ' / ) ;
280281 const stdout = child . stdout . toString ( ) ;
281282 assert . strictEqual ( stdout , '' ) ;
283+ assert . strictEqual ( child . status , 1 ) ;
284+ assert . strictEqual ( child . signal , null ) ;
282285}
283286
284287{
285288 // --test-shard option validation
286289 const args = [ '--test' , '--test-shard=1/2/3' , join ( testFixtures , 'index.js' ) ] ;
287290 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
288291
289- assert . strictEqual ( child . status , 1 ) ;
290- assert . strictEqual ( child . signal , null ) ;
291292 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 ' / ) ;
292293 const stdout = child . stdout . toString ( ) ;
293294 assert . strictEqual ( stdout , '' ) ;
295+ assert . strictEqual ( child . status , 1 ) ;
296+ assert . strictEqual ( child . signal , null ) ;
294297}
295298
296299{
297300 // --test-shard option validation
298301 const args = [ '--test' , '--test-shard=0/3' , join ( testFixtures , 'index.js' ) ] ;
299302 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
300303
301- assert . strictEqual ( child . status , 1 ) ;
302- assert . strictEqual ( child . signal , null ) ;
303304 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 / ) ;
304305 const stdout = child . stdout . toString ( ) ;
305306 assert . strictEqual ( stdout , '' ) ;
307+ assert . strictEqual ( child . status , 1 ) ;
308+ assert . strictEqual ( child . signal , null ) ;
306309}
307310
308311{
309312 // --test-shard option validation
310313 const args = [ '--test' , '--test-shard=0xf/20abcd' , join ( testFixtures , 'index.js' ) ] ;
311314 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
312315
313- assert . strictEqual ( child . status , 1 ) ;
314- assert . strictEqual ( child . signal , null ) ;
315316 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 ' / ) ;
316317 const stdout = child . stdout . toString ( ) ;
317318 assert . strictEqual ( stdout , '' ) ;
319+ assert . strictEqual ( child . status , 1 ) ;
320+ assert . strictEqual ( child . signal , null ) ;
318321}
319322
320323{
321324 // --test-shard option validation
322325 const args = [ '--test' , '--test-shard=hello' , join ( testFixtures , 'index.js' ) ] ;
323326 const child = spawnSync ( process . execPath , args , { cwd : testFixtures } ) ;
324327
325- assert . strictEqual ( child . status , 1 ) ;
326- assert . strictEqual ( child . signal , null ) ;
327328 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 ' / ) ;
328329 const stdout = child . stdout . toString ( ) ;
329330 assert . strictEqual ( stdout , '' ) ;
331+ assert . strictEqual ( child . status , 1 ) ;
332+ assert . strictEqual ( child . signal , null ) ;
330333}
331334
332335{
@@ -339,8 +342,6 @@ for (const isolation of ['none', 'process']) {
339342 ] ;
340343 const child = spawnSync ( process . execPath , args ) ;
341344
342- assert . strictEqual ( child . status , 0 ) ;
343- assert . strictEqual ( child . signal , null ) ;
344345 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
345346 const stdout = child . stdout . toString ( ) ;
346347 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']) {
362363 assert . match ( stdout , / # p a s s 5 / ) ;
363364 assert . match ( stdout , / # f a i l 0 / ) ;
364365 assert . match ( stdout , / # s k i p p e d 0 / ) ;
366+
367+ assert . strictEqual ( child . status , 0 ) ;
368+ assert . strictEqual ( child . signal , null ) ;
365369}
366370
367371{
@@ -374,8 +378,6 @@ for (const isolation of ['none', 'process']) {
374378 ] ;
375379 const child = spawnSync ( process . execPath , args ) ;
376380
377- assert . strictEqual ( child . status , 0 ) ;
378- assert . strictEqual ( child . signal , null ) ;
379381 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
380382 const stdout = child . stdout . toString ( ) ;
381383 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']) {
397399 assert . match ( stdout , / # p a s s 5 / ) ;
398400 assert . match ( stdout , / # f a i l 0 / ) ;
399401 assert . match ( stdout , / # s k i p p e d 0 / ) ;
402+
403+ assert . strictEqual ( child . status , 0 ) ;
404+ assert . strictEqual ( child . signal , null ) ;
400405}
401406
402407{
403408 // Should not match files like latest.js
404409 const args = [ '--test' , '--test-reporter=tap' ] ;
405410 const child = spawnSync ( process . execPath , args , { cwd : join ( testFixtures , 'issue-54726' ) } ) ;
406411
407- assert . strictEqual ( child . status , 0 ) ;
408- assert . strictEqual ( child . signal , null ) ;
409412 assert . strictEqual ( child . stderr . toString ( ) , '' ) ;
410413 const stdout = child . stdout . toString ( ) ;
411414
@@ -416,4 +419,7 @@ for (const isolation of ['none', 'process']) {
416419 assert . match ( stdout , / c a n c e l l e d 0 / ) ;
417420 assert . match ( stdout , / s k i p p e d 0 / ) ;
418421 assert . match ( stdout , / t o d o 0 / ) ;
422+
423+ assert . strictEqual ( child . status , 0 ) ;
424+ assert . strictEqual ( child . signal , null ) ;
419425}
0 commit comments