@@ -102,6 +102,10 @@ const outdated = (dir, opts) => {
102
102
103
103
t . beforeEach ( ( ) => logs = '' )
104
104
105
+ const { exitCode } = process
106
+
107
+ t . afterEach ( ( ) => process . exitCode = exitCode )
108
+
105
109
const redactCwd = ( path ) => {
106
110
const normalizePath = p => p
107
111
. replace ( / \\ + / g, '/' )
@@ -175,6 +179,7 @@ t.test('should display outdated deps', t => {
175
179
outdated ( null , {
176
180
config : { global : true } ,
177
181
} ) . exec ( [ ] , ( ) => {
182
+ t . equal ( process . exitCode , 1 )
178
183
t . matchSnapshot ( logs )
179
184
t . end ( )
180
185
} )
@@ -187,6 +192,7 @@ t.test('should display outdated deps', t => {
187
192
} ,
188
193
color : true ,
189
194
} ) . exec ( [ ] , ( ) => {
195
+ t . equal ( process . exitCode , 1 )
190
196
t . matchSnapshot ( logs )
191
197
t . end ( )
192
198
} )
@@ -200,6 +206,7 @@ t.test('should display outdated deps', t => {
200
206
} ,
201
207
color : true ,
202
208
} ) . exec ( [ ] , ( ) => {
209
+ t . equal ( process . exitCode , 1 )
203
210
t . matchSnapshot ( logs )
204
211
t . end ( )
205
212
} )
@@ -213,6 +220,7 @@ t.test('should display outdated deps', t => {
213
220
} ,
214
221
color : true ,
215
222
} ) . exec ( [ ] , ( ) => {
223
+ t . equal ( process . exitCode , 1 )
216
224
t . matchSnapshot ( logs )
217
225
t . end ( )
218
226
} )
@@ -226,6 +234,7 @@ t.test('should display outdated deps', t => {
226
234
} ,
227
235
color : true ,
228
236
} ) . exec ( [ ] , ( ) => {
237
+ t . equal ( process . exitCode , 1 )
229
238
t . matchSnapshot ( logs )
230
239
t . end ( )
231
240
} )
@@ -238,6 +247,7 @@ t.test('should display outdated deps', t => {
238
247
long : true ,
239
248
} ,
240
249
} ) . exec ( [ ] , ( ) => {
250
+ t . equal ( process . exitCode , 1 )
241
251
t . matchSnapshot ( logs )
242
252
t . end ( )
243
253
} )
@@ -250,6 +260,7 @@ t.test('should display outdated deps', t => {
250
260
json : true ,
251
261
} ,
252
262
} ) . exec ( [ ] , ( ) => {
263
+ t . equal ( process . exitCode , 1 )
253
264
t . matchSnapshot ( logs )
254
265
t . end ( )
255
266
} )
@@ -263,6 +274,7 @@ t.test('should display outdated deps', t => {
263
274
long : true ,
264
275
} ,
265
276
} ) . exec ( [ ] , ( ) => {
277
+ t . equal ( process . exitCode , 1 )
266
278
t . matchSnapshot ( logs )
267
279
t . end ( )
268
280
} )
@@ -275,6 +287,7 @@ t.test('should display outdated deps', t => {
275
287
parseable : true ,
276
288
} ,
277
289
} ) . exec ( [ ] , ( ) => {
290
+ t . equal ( process . exitCode , 1 )
278
291
t . matchSnapshot ( logs )
279
292
t . end ( )
280
293
} )
@@ -288,6 +301,7 @@ t.test('should display outdated deps', t => {
288
301
long : true ,
289
302
} ,
290
303
} ) . exec ( [ ] , ( ) => {
304
+ t . equal ( process . exitCode , 1 )
291
305
t . matchSnapshot ( logs )
292
306
t . end ( )
293
307
} )
@@ -299,6 +313,7 @@ t.test('should display outdated deps', t => {
299
313
all : true ,
300
314
} ,
301
315
} ) . exec ( [ ] , ( ) => {
316
+ t . equal ( process . exitCode , 1 )
302
317
t . matchSnapshot ( logs )
303
318
t . end ( )
304
319
} )
@@ -310,6 +325,7 @@ t.test('should display outdated deps', t => {
310
325
global : false ,
311
326
} ,
312
327
} ) . exec ( [ 'cat' ] , ( ) => {
328
+ t . equal ( process . exitCode , 1 )
313
329
t . matchSnapshot ( logs )
314
330
t . end ( )
315
331
} )
@@ -540,6 +556,7 @@ t.test('workspaces', async t => {
540
556
rej ( err )
541
557
542
558
t . matchSnapshot ( logs , 'should display ws outdated deps human output' )
559
+ t . equal ( process . exitCode , 1 )
543
560
res ( )
544
561
} )
545
562
} )
@@ -554,6 +571,7 @@ t.test('workspaces', async t => {
554
571
rej ( err )
555
572
556
573
t . matchSnapshot ( logs , 'should display ws outdated deps json output' )
574
+ t . equal ( process . exitCode , 1 )
557
575
res ( )
558
576
} )
559
577
} )
@@ -568,6 +586,7 @@ t.test('workspaces', async t => {
568
586
rej ( err )
569
587
570
588
t . matchSnapshot ( logs , 'should display ws outdated deps parseable output' )
589
+ t . equal ( process . exitCode , 1 )
571
590
res ( )
572
591
} )
573
592
} )
@@ -582,6 +601,7 @@ t.test('workspaces', async t => {
582
601
rej ( err )
583
602
584
603
t . matchSnapshot ( logs , 'should display all dependencies' )
604
+ t . equal ( process . exitCode , 1 )
585
605
res ( )
586
606
} )
587
607
} )
@@ -594,6 +614,7 @@ t.test('workspaces', async t => {
594
614
rej ( err )
595
615
596
616
t . matchSnapshot ( logs , 'should highlight ws in dependend by section' )
617
+ t . equal ( process . exitCode , 1 )
597
618
res ( )
598
619
} )
599
620
} )
@@ -604,6 +625,7 @@ t.test('workspaces', async t => {
604
625
rej ( err )
605
626
606
627
t . matchSnapshot ( logs , 'should display results filtered by ws' )
628
+ t . equal ( process . exitCode , 1 )
607
629
res ( )
608
630
} )
609
631
} )
@@ -618,6 +640,7 @@ t.test('workspaces', async t => {
618
640
rej ( err )
619
641
620
642
t . matchSnapshot ( logs , 'should display json results filtered by ws' )
643
+ t . equal ( process . exitCode , 1 )
621
644
res ( )
622
645
} )
623
646
} )
@@ -632,6 +655,7 @@ t.test('workspaces', async t => {
632
655
rej ( err )
633
656
634
657
t . matchSnapshot ( logs , 'should display parseable results filtered by ws' )
658
+ t . equal ( process . exitCode , 1 )
635
659
res ( )
636
660
} )
637
661
} )
@@ -647,6 +671,7 @@ t.test('workspaces', async t => {
647
671
648
672
t . matchSnapshot ( logs ,
649
673
'should display nested deps when filtering by ws and using --all' )
674
+ t . equal ( process . exitCode , 1 )
650
675
res ( )
651
676
} )
652
677
} )
@@ -669,6 +694,7 @@ t.test('workspaces', async t => {
669
694
670
695
t . matchSnapshot ( logs ,
671
696
'should display missing deps when filtering by ws' )
697
+ t . equal ( process . exitCode , 1 )
672
698
res ( )
673
699
} )
674
700
} )
0 commit comments