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: use unknown statusText by default in mocks #1391

Merged
merged 1 commit into from May 2, 2022

Conversation

KhafraDev
Copy link
Member

When encountering an unknown status code, an error should not be thrown. This behavior now matches fetch's behavior (tested with undici & node-fetch, unsure about browsers but I doubt it is different).

@codecov-commenter
Copy link

codecov-commenter commented May 1, 2022

Codecov Report

Merging #1391 (50338ac) into main (088518a) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1391   +/-   ##
=======================================
  Coverage   94.29%   94.29%           
=======================================
  Files          47       47           
  Lines        4240     4240           
=======================================
  Hits         3998     3998           
  Misses        242      242           
Impacted Files Coverage Δ
lib/mock/mock-utils.js 100.00% <100.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 088518a...50338ac. 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

@ronag ronag merged commit f671829 into nodejs:main May 2, 2022
@KhafraDev KhafraDev deleted the fix-unknown-status-code-mocks branch May 2, 2022 14:14
KhafraDev added 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.

None yet

4 participants