I have a method where I am using Node.js pipeline() that is having a last argument for a callback.
doSomething(readStream, destinationwritableStream): void {
pipeline(readStream, destinationwritableStream, async () => {
// some code here.
// unable to cover this code using JEST
})
}
Any suggestions, how I can cover this async() callback or how to mock pipeline() method.
Thanks in advance.