-
Notifications
You must be signed in to change notification settings - Fork 35
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
replace bluebird promises with async/await & superagent with native fetch #63
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #63 +/- ##
==========================================
+ Coverage 94.24% 97.09% +2.84%
==========================================
Files 16 16
Lines 365 344 -21
Branches 67 58 -9
==========================================
- Hits 344 334 -10
+ Misses 19 9 -10
+ Partials 2 1 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
eab7729
to
c686b0f
Compare
c686b0f
to
926ab05
Compare
76c4eea
to
5ad89ac
Compare
76c4eea
to
8d35c1b
Compare
instead of defining Promises we are now using async-await-syntax to handle promises.
- fetch() only rejects network errors, other errors need to be thrown manually by checking response.ok
- inline return - throw Error instead of object (old also threw error) - error now contains fetch Response which still can be consumed BREAKING-CHANGE: Response object from Error is not superagent but fetch response type (https://developer.mozilla.org/en-US/docs/Web/API/Response) that can still be consumed Co-authored-by: Amandus Butzer <amandus.butzer@heigit.org>
8d35c1b
to
7ff3bd7
Compare
- test missing layers parameter in geocode - use cy.intercept instead of actual API request - test missing format parameter in directions
- showcase try-catch + async-await syntax instead of .then chaining - add example on how to connect ot local ors instance
7ff3bd7
to
ad479aa
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
removes dependency on bluebird and superagent, solves #61 and #64