Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readable Stream support #142

Closed
lucaslago opened this issue Jun 29, 2018 · 1 comment · Fixed by #144
Closed

Readable Stream support #142

lucaslago opened this issue Jun 29, 2018 · 1 comment · Fixed by #144

Comments

@lucaslago
Copy link

lucaslago commented Jun 29, 2018

Does this module support passing a readable stream to mock S3 instead of passing a callback?

Example:

const fileDirectory = path.join( __dirname, './test_fixtures/archive.tar.gz' );

AWSMock.mock( 'S3', 'getObject', fs.createReadStream( fileDirectory ) );

const readStream = s3.getObject().createReadStream().pipe(process.stdout); // should print the contents of archive.tar.gz
@lucaslago
Copy link
Author

I see it supports streams but it is always empty, is that correct? https://github.com/dwyl/aws-sdk-mock/blob/master/test/index.test.js#L222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant