File tree 2 files changed +5
-8
lines changed 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -828,11 +828,6 @@ export class SizedMessageTransform extends Transform {
828
828
829
829
callback ( ) ;
830
830
}
831
-
832
- override pipe < T extends NodeJS . WritableStream > ( destination : T , options ?: { end ?: boolean } ) : T {
833
- destination . on ( 'drain' , this . emit . bind ( 'drain' ) ) ;
834
- return super . pipe ( destination , options ) ;
835
- }
836
831
}
837
832
838
833
/** @internal */
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ describe('new Connection()', function () {
323
323
} ) ;
324
324
} ) ;
325
325
326
- describe . only ( 'SizedMessageTransform' , function ( ) {
326
+ describe ( 'SizedMessageTransform' , function ( ) {
327
327
it ( 'parses chunks of wire messages' , function ( ) {
328
328
const stream = new SizedMessageTransform ( { connection : { } as any } ) ;
329
329
// Message of length 4 + 4 = 8
@@ -341,7 +341,8 @@ describe('new Connection()', function () {
341
341
const stream = new SizedMessageTransform ( { connection : { } as any } ) ;
342
342
343
343
let dataCount = 0 ;
344
- stream . on ( 'data' , ( ) => {
344
+ stream . on ( 'data' , chunk => {
345
+ expect ( chunk ) . to . have . lengthOf ( 8 ) ;
345
346
dataCount += 1 ;
346
347
} ) ;
347
348
@@ -361,7 +362,8 @@ describe('new Connection()', function () {
361
362
const stream = new SizedMessageTransform ( { connection : { } as any } ) ;
362
363
363
364
let dataCount = 0 ;
364
- stream . on ( 'data' , ( ) => {
365
+ stream . on ( 'data' , chunk => {
366
+ expect ( chunk ) . to . have . lengthOf ( 8 ) ;
365
367
dataCount += 1 ;
366
368
} ) ;
367
369
You can’t perform that action at this time.
0 commit comments