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: Fetch Implementation #1256

Merged

Conversation

haricnugraha
Copy link
Contributor

@haricnugraha haricnugraha commented Mar 20, 2024

Monika Pull Request (PR)

What feature/issue does this PR add

Fix failed tests when using fetch. It resolves #1257.

How did you implement / how did you fix it

Implemented by mimicking Axios's implementation of HTTP requests.

How to test

  1. Change flags['native-fetch'] to true in here.
  2. Run npm test.

Screenshot

Axios

Screenshot 2024-03-20 at 4 08 07 PM

Fetch

native-fetch

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 51.28205% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 62.37%. Comparing base (f6ecb27) to head (e78b2e6).

Files Patch % Lines
src/utils/http.ts 42.30% 14 Missing and 1 partial ⚠️
src/components/probe/prober/http/request.ts 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1256      +/-   ##
==========================================
- Coverage   62.72%   62.37%   -0.35%     
==========================================
  Files         111      111              
  Lines        3364     3378      +14     
  Branches      590      590              
==========================================
- Hits         2110     2107       -3     
- Misses       1064     1080      +16     
- Partials      190      191       +1     

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

@haricnugraha haricnugraha marked this pull request as ready for review March 20, 2024 09:30
Copy link
Contributor

@dennypradipta dennypradipta left a comment

Choose a reason for hiding this comment

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

Nicely done. Tested on my machine.

@sapiderman sapiderman merged commit e958048 into hyperjumptech:main Mar 21, 2024
8 checks passed
@haricnugraha haricnugraha deleted the fix/native-fetch-implementation branch March 21, 2024 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants