11import { createHash } from "crypto" ;
2- import getStream from "get-stream" ;
2+ import { buffer as getStreamBuffer } from "get-stream" ;
33import * as through2 from "through2" ;
44
55import { createIntegrity } from "../lib/utils" ;
@@ -498,21 +498,21 @@ describe( "body", ( ) =>
498498 it ( "handle null" , async ( ) =>
499499 {
500500 const body = new DataBody ( null ) ;
501- const data = await getStream . buffer ( await body . readable ( ) ) ;
501+ const data = await getStreamBuffer ( await body . readable ( ) ) ;
502502 expect ( data . toString ( ) ) . toBe ( "" ) ;
503503 } ) ;
504504
505505 it ( "handle string" , async ( ) =>
506506 {
507507 const body = new DataBody ( "foo" ) ;
508- const data = await getStream . buffer ( await body . readable ( ) ) ;
508+ const data = await getStreamBuffer ( await body . readable ( ) ) ;
509509 expect ( data . toString ( ) ) . toBe ( "foo" ) ;
510510 } ) ;
511511
512512 it ( "handle buffer" , async ( ) =>
513513 {
514514 const body = new DataBody ( Buffer . from ( "foo" ) ) ;
515- const data = await getStream . buffer ( await body . readable ( ) ) ;
515+ const data = await getStreamBuffer ( await body . readable ( ) ) ;
516516 expect ( data . toString ( ) ) . toBe ( "foo" ) ;
517517 } ) ;
518518
@@ -521,7 +521,7 @@ describe( "body", ( ) =>
521521 const stream = through2 ( ) ;
522522 stream . end ( "foo" ) ;
523523 const body = new StreamBody ( stream ) ;
524- const data = await getStream . buffer ( await body . readable ( ) ) ;
524+ const data = await getStreamBuffer ( await body . readable ( ) ) ;
525525 expect ( data . toString ( ) ) . toBe ( "foo" ) ;
526526 } ) ;
527527 } ) ;
0 commit comments