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

feat(mock): allow matching the complete header list #1275

Merged
merged 5 commits into from Mar 13, 2022
Merged

feat(mock): allow matching the complete header list #1275

merged 5 commits into from Mar 13, 2022

Conversation

panva
Copy link
Member

@panva panva commented Mar 11, 2022

resolves #1269 and (subjectively) a preferred alternative to #1274

@panva
Copy link
Member Author

panva commented Mar 11, 2022

Might need to use a regular object instead of Headers for node < 16 compat. Happy to do so given otherwise non blocking feedback.

@mcollina
Copy link
Member

code looks great!

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2022

Codecov Report

Merging #1275 (9e48f64) into main (cedc7d2) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1275      +/-   ##
==========================================
+ Coverage   94.10%   94.11%   +0.01%     
==========================================
  Files          44       44              
  Lines        4090     4097       +7     
==========================================
+ Hits         3849     3856       +7     
  Misses        241      241              
Impacted Files Coverage Δ
lib/mock/mock-utils.js 100.00% <100.00%> (ø)
lib/mock/mock-interceptor.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cedc7d2...9e48f64. Read the comment docs.

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

@mcollina mcollina merged commit ab7c95e into nodejs:main Mar 13, 2022
@panva panva deleted the match-headers-whole branch March 13, 2022 18:22
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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.

Mocks should allow to match headers that are meant to be missing
3 participants