-
-
Notifications
You must be signed in to change notification settings - Fork 374
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for async await in handler #59
Conversation
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 10 10
Lines 157 165 +8
Branches 36 37 +1
=====================================
+ Hits 157 165 +8
Continue to review full report at Codecov.
|
@joseSantacruz can you please verify if the typescript changes here make sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. GJ. Just a couple of teeny things.
README.md
Outdated
}) | ||
``` | ||
|
||
We believe that the async/await version is easier to read and reason about. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is redundant based on sentence above I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
src/__tests__/middy.js
Outdated
}) | ||
}) | ||
|
||
test('An handler that returns a non-promise should trigger an error', (endTest) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo. s/An handler/A handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
src/__tests__/middy.js
Outdated
}) | ||
}) | ||
|
||
test('An handler that returns a non-promise should trigger an error', (endTest) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about handling then-able objects?
Closes #52
TODO:
READY FOR REVIEW 馃