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

fix data url test #2580

Merged
merged 1 commit into from
Jan 3, 2024
Merged

fix data url test #2580

merged 1 commit into from
Jan 3, 2024

Conversation

KhafraDev
Copy link
Member

Fixes #2579

fix was easier than I expected, I just reverted the changes here for the most part.

if (leading) {
while (j > i && isASCIIWhitespace(str.charCodeAt(i))) --i
Copy link
Member Author

@KhafraDev KhafraDev Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so unless str.length was 0 j > i would always be true... and we're decrementing from i, which means if isASCIIWhitespace(...) was true, i would be negative? Not sure why I didn't realize this before.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also using i and j instead of lead and trail shouldn't have landed

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

fixup

fixup
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

Attention: 156 lines in your changes are missing coverage. Please review.

Comparison is base (e39a632) 85.54% compared to head (61803bc) 84.71%.
Report is 190 commits behind head on main.

Files Patch % Lines
lib/fetch/index.js 67.29% 52 Missing ⚠️
lib/fetch/util.js 35.52% 49 Missing ⚠️
lib/handler/RetryHandler.js 74.35% 30 Missing ⚠️
lib/api/readable.js 88.88% 5 Missing ⚠️
lib/fetch/headers.js 90.19% 5 Missing ⚠️
lib/client.js 93.44% 4 Missing ⚠️
lib/compat/dispatcher-weakref.js 42.85% 4 Missing ⚠️
lib/core/util.js 95.55% 2 Missing ⚠️
lib/fetch/request.js 92.00% 2 Missing ⚠️
lib/core/request.js 98.21% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2580      +/-   ##
==========================================
- Coverage   85.54%   84.71%   -0.84%     
==========================================
  Files          76       80       +4     
  Lines        6858     7241     +383     
==========================================
+ Hits         5867     6134     +267     
- Misses        991     1107     +116     

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

@KhafraDev KhafraDev merged commit 5a07f56 into nodejs:main Jan 3, 2024
@KhafraDev KhafraDev deleted the fix-data-url-test branch January 3, 2024 02:17
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.

fetch: data url test fails
4 participants