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(buildApiResponse): response content type #318

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

cdcabrera
Copy link
Owner

@cdcabrera cdcabrera commented Jan 24, 2024

What's included

  • fix(buildApiResponse): response content type

Notes

  • patches a bug from the past year where every response returned is text/plain content type. It appears the issue was around commit 7fc30f9 and introduced in v4.3.0
    • unfortunately the unit tests wouldn't catch a simple parameter rename issue but an end-2-end would, we're reviewing how we can catch this in the future... mistaken, a consuming function unit test buildResponse helps cover this gap, test added

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test
  3. confirm tests come back clean

Local development run

  1. update the NPM packages with $ yarn
  2. $ yarn start:dev
  3. modify example content types under the ./data/example.js file to include
    • zip
    • gzip
    • css
      ... and confirm that is the response type returned in the log and browser

Example

...

Updates issue/story

ongoing

@cdcabrera cdcabrera added the bug Something isn't working label Jan 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2024

Codecov Report

Merging #318 (97ced3b) into main (4467f24) will decrease coverage by 0.90%.
The diff coverage is 57.14%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
- Coverage   79.58%   78.69%   -0.90%     
==========================================
  Files           7        7              
  Lines         289      291       +2     
  Branches       96       99       +3     
==========================================
- Hits          230      229       -1     
- Misses         53       56       +3     
  Partials        6        6              
Files Coverage Δ
src/buildApiResponse.js 74.19% <57.14%> (-2.04%) ⬇️

Continue to review full report in Codecov by Sentry.

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

* buildApiResponse, fix, expand response types
@cdcabrera cdcabrera merged commit ce29a70 into main Jan 25, 2024
4 checks passed
@cdcabrera cdcabrera deleted the 20240124-patch branch January 25, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants