File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1344,12 +1344,13 @@ tmpdir.refresh();
13441344
13451345{
13461346 const ac = new AbortController ( ) ;
1347+ const reason = new Error ( 'Reason' ) ;
13471348 const r = Readable . from ( async function * ( ) {
13481349 for ( let i = 0 ; i < 10 ; i ++ ) {
13491350 await Promise . resolve ( ) ;
13501351 yield String ( i ) ;
13511352 if ( i === 5 ) {
1352- ac . abort ( ) ;
1353+ ac . abort ( reason ) ;
13531354 }
13541355 }
13551356 } ( ) ) ;
@@ -1362,6 +1363,7 @@ tmpdir.refresh();
13621363 } ) ;
13631364 const cb = common . mustCall ( ( err ) => {
13641365 assert . strictEqual ( err . name , 'AbortError' ) ;
1366+ assert . strictEqual ( err . cause , reason ) ;
13651367 assert . strictEqual ( res , '012345' ) ;
13661368 assert . strictEqual ( w . destroyed , true ) ;
13671369 assert . strictEqual ( r . destroyed , true ) ;
You can’t perform that action at this time.
0 commit comments