File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -483,12 +483,14 @@ describe('core', () => {
483
483
await p1
484
484
} catch ( e ) {
485
485
assert . equal ( e . exitCode , 1 )
486
+ assert . equal ( e . stdout , '' )
486
487
}
487
488
488
489
try {
489
490
await p2
490
491
} catch ( e ) {
491
492
assert . equal ( e . exitCode , 1 )
493
+ assert . equal ( e . stdout , '' )
492
494
}
493
495
494
496
const p3 = await $ ( { nothrow : true } ) `echo hello && exit 1` . pipe ( $ `cat` )
@@ -500,14 +502,17 @@ describe('core', () => {
500
502
await p4
501
503
} catch ( e ) {
502
504
assert . equal ( e . exitCode , 1 )
505
+ assert . equal ( e . stdout , '' )
503
506
}
504
507
505
508
const p5 = $ `echo foo && exit 1`
506
509
const [ r1 , r2 ] = await Promise . allSettled ( [
507
510
p5 . pipe ( $ ( { nothrow : true } ) `cat` ) ,
508
511
p5 . pipe ( $ `cat` ) ,
509
512
] )
513
+ assert . equal ( r1 . value . stdout , 'foo\n' )
510
514
assert . equal ( r1 . value . exitCode , 0 )
515
+ assert . equal ( r2 . reason . stdout , 'foo\n' )
511
516
assert . equal ( r2 . reason . exitCode , 1 )
512
517
} )
513
518
} )
You can’t perform that action at this time.
0 commit comments