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

Pass in AWS client in constructor #23

Closed
crccheck opened this issue Feb 18, 2017 · 0 comments · Fixed by #24
Closed

Pass in AWS client in constructor #23

crccheck opened this issue Feb 18, 2017 · 0 comments · Fixed by #24

Comments

@crccheck
Copy link
Owner

It's sorta like nasty dependency injection, but it's also quite practical because right now I'm making assumptions about how the client should be instantiated. And this will make writing tests so much easier!

inspired by https://github.com/rclark/kinesis-readable

crccheck added a commit that referenced this issue Feb 18, 2017
Currently it makes a lot of assumptions about how to connect to AWS. This moves the responsibility for setting up the connection to AWS from the library to the user of the library. As a side benefit, tests get a lot simpler.

Inspired by https://github.com/rclark/kinesis-readable

closes #23 

* greenkeeper

* refactor so client is passed in

* yagni

* cleanup

* doc update

* cleanup package.json
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