File tree Expand file tree Collapse file tree 1 file changed +16
-20
lines changed
Expand file tree Collapse file tree 1 file changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -1753,24 +1753,20 @@ tmpdir.refresh();
17531753{
17541754 // Errors thrown in Readable.map inside pipeline should not be
17551755 // swallowed by AbortError when the source is an infinite stream.
1756- async function run ( ) {
1757- await assert . rejects (
1758- pipelinep (
1759- new Readable ( { read ( ) { this . push ( 'data' ) ; } } ) ,
1760- new Transform ( {
1761- readableObjectMode : true ,
1762- transform ( chunk , encoding , callback ) {
1763- this . push ( { } ) ;
1764- callback ( ) ;
1765- } ,
1766- } ) ,
1767- ( readable ) => readable . map ( async ( ) => {
1768- throw new Error ( 'Boom!' ) ;
1769- } ) ,
1770- ) ,
1771- { message : 'Boom!' } ,
1772- ) ;
1773- }
1774-
1775- run ( ) . then ( common . mustCall ( ) ) ;
1756+ pipeline (
1757+ new Readable ( { read ( ) { this . push ( 'data' ) ; } } ) ,
1758+ new Transform ( {
1759+ readableObjectMode : true ,
1760+ transform ( chunk , encoding , callback ) {
1761+ this . push ( { } ) ;
1762+ callback ( ) ;
1763+ } ,
1764+ } ) ,
1765+ ( readable ) => readable . map ( async ( ) => {
1766+ throw new Error ( 'Boom!' ) ;
1767+ } ) ,
1768+ common . mustCall ( ( err ) => {
1769+ assert . strictEqual ( err . message , 'Boom!' ) ;
1770+ } ) ,
1771+ ) ;
17761772}
You can’t perform that action at this time.
0 commit comments