A promise based Node.js package that converts a Node.js Readable to buffer
npm i @jorgeferrero/stream-to-buffer
import { streamToBuffer } from '@jorgeferrero/stream-to-buffer';
import * as fs from 'fs';
const data = await streamToBuffer(fs.createReadStream('./file'));
console.log(data.toString());
Output should be the the content of the file
npm run test