File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -483,12 +483,14 @@ describe('core', () => {
483483 await p1
484484 } catch ( e ) {
485485 assert . equal ( e . exitCode , 1 )
486+ assert . equal ( e . stdout , '' )
486487 }
487488
488489 try {
489490 await p2
490491 } catch ( e ) {
491492 assert . equal ( e . exitCode , 1 )
493+ assert . equal ( e . stdout , '' )
492494 }
493495
494496 const p3 = await $ ( { nothrow : true } ) `echo hello && exit 1` . pipe ( $ `cat` )
@@ -500,14 +502,17 @@ describe('core', () => {
500502 await p4
501503 } catch ( e ) {
502504 assert . equal ( e . exitCode , 1 )
505+ assert . equal ( e . stdout , '' )
503506 }
504507
505508 const p5 = $ `echo foo && exit 1`
506509 const [ r1 , r2 ] = await Promise . allSettled ( [
507510 p5 . pipe ( $ ( { nothrow : true } ) `cat` ) ,
508511 p5 . pipe ( $ `cat` ) ,
509512 ] )
513+ assert . equal ( r1 . value . stdout , 'foo\n' )
510514 assert . equal ( r1 . value . exitCode , 0 )
515+ assert . equal ( r2 . reason . stdout , 'foo\n' )
511516 assert . equal ( r2 . reason . exitCode , 1 )
512517 } )
513518 } )
You can’t perform that action at this time.
0 commit comments