Repository navigation
include edge case tests for res.type() - #7037
Merged
Merged
Conversation
Contributor
Author
|
Hi maintainers, just a gentle reminder for review. |
UlisesGascon
left a comment
Member
There was a problem hiding this comment.
Hey @IshitaSingh0822!
It can take sometime until we review the prs and merge them to the project. Also I changed the title of the PR to make more descriptive for the reviewers.
I highly recommend you to follow conventional commits or a similar approach to also make the commits more descriptive. In this case is fine, as we will squash it when we land the PR so we can retitle the commit at that step.
Thanks for contributing to the project! ❤️
GroophyLifefor
suggested changes
Feb 19, 2026
- Add extra spacing before edge cases describe block - Address maintainer feedback
UlisesGascon
approved these changes
Feb 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:-
This PR adds edge case tests for
res.type()to improve test coverage for the response type-setting functionality.Motivation:-
While reviewing the test coverage for
res.type(), I noticed that several edge cases weren't being tested. These edge cases could lead to unexpected behaviour or bugs in production.Changes:-
Added 5 new test cases under a new
describe('edge cases')block:application/octet-stream.jsonvsjsonhandling.tar.gzFILE.JSONworks likefile.jsonfile@test.jsonTesting:-
npm testAll tests passing: 1249 passing (1s)
Impact:-
res.type()