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

refactor: Optimizing access to header values in default request #430

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

winie
Copy link

@winie winie commented Jul 28, 2022

When iterating over header values with array functions, the header values are passed directly to the array function.

When iterating over header values with array functions, the header values are passed directly to the array function.
@vercel
Copy link

vercel bot commented Jul 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
upload ✅ Ready (Inspect) Visit Preview Jul 31, 2022 at 8:56PM (UTC)

@afc163
Copy link
Member

afc163 commented Jul 29, 2022

Could you provide reproduce and add a test case for it?

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #430 (89dd2b3) into master (0d0ca2f) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head 89dd2b3 differs from pull request most recent head 6be7fba. Consider uploading reports for the commit 6be7fba to get more accurate results

@@            Coverage Diff             @@
##           master     #430      +/-   ##
==========================================
- Coverage   84.92%   84.86%   -0.07%     
==========================================
  Files           6        6              
  Lines         252      251       -1     
  Branches       63       59       -4     
==========================================
- Hits          214      213       -1     
  Misses         38       38              
Impacted Files Coverage Δ
src/request.ts 96.07% <100.00%> (-0.08%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@winie
Copy link
Author

winie commented Jul 31, 2022

Could you provide reproduce and add a test case for it?

The behaviour of the component has not changed. I only replaced the for-loops in the request.ts with more modern iterations. Therefore, the previous tests should be sufficient.

If you mean the 0.07% lost percentage of test coverage:
This is because there are fewer lines of code and the 2 lines that were not tested before are now more important.
https://app.codecov.io/gh/react-component/upload/compare/430/tree/src/request.ts

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.

2 participants