Skip to content

refactor: make Connection#makeRequest use async/await#1492

Open
arthurschreiber wants to merge 15 commits into
masterfrom
arthur/refactor-make-request
Open

refactor: make Connection#makeRequest use async/await#1492
arthurschreiber wants to merge 15 commits into
masterfrom
arthur/refactor-make-request

Conversation

@arthurschreiber

Copy link
Copy Markdown
Collaborator

This refactors Connection#makeRequest to be an async function, and to use async/await to make the code flow more explicit.

I pulled in all the logic from enter handlers of the SENT_CLIENT_REQUEST and SENT_ATTENTION states, so Connection#makeRequest contains now all the logic of sending a request, handling cancellation, and reading the response.

@codecov

codecov Bot commented Nov 3, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.20419% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.91%. Comparing base (b78df14) to head (903c1c5).
⚠️ Report is 75 commits behind head on master.

Files with missing lines Patch % Lines
src/connection.ts 71.20% 45 Missing and 10 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1492      +/-   ##
==========================================
+ Coverage   79.83%   79.91%   +0.07%     
==========================================
  Files          92       91       -1     
  Lines        4692     4765      +73     
  Branches      871      886      +15     
==========================================
+ Hits         3746     3808      +62     
+ Misses        673      667       -6     
- Partials      273      290      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 this pull request may close these issues.

1 participant