Closed frankli-dev closed 4 years ago
const s3 = aws.getS3(); const params = { Bucket: process.env.AWS_S3_BUCKET, Key: filename }; const stream = s3.getObject(params).createReadStream();
I would like to mock const stream = s3.getObject(params).createReadStream() but not sure how I can do this with simple-mock
const stream = s3.getObject(params).createReadStream()
Please help Thanks in advance,
Oops. I've found the solution by mocking the getObject function with an object that returns createReadStream I thought in the wrong way.
getObject
Great lib.
I would like to mock
const stream = s3.getObject(params).createReadStream()
but not sure how I can do this with simple-mockPlease help Thanks in advance,