test: add query parameter boundary validation tests for streak API#3663
Open
sureshsuriya wants to merge 2 commits into
Open
test: add query parameter boundary validation tests for streak API#3663sureshsuriya wants to merge 2 commits into
sureshsuriya wants to merge 2 commits into
Conversation
…k API - Add 30+ comprehensive boundary validation tests for grace parameter (0-7 range) - Add 14+ boundary validation tests for opacity parameter (0.1-1.0 range) - Add combined parameter validation tests - Tests verify strict boundary enforcement and proper validation error messages - All 174 tests pass, providing complete coverage of parameter clamping behavior - Ensures future code refactors don't accidentally remove validation logic Closes JhaSourav07#3659
Contributor
|
@sureshsuriya is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
Aamod007
approved these changes
Jun 4, 2026
Collaborator
Aamod007
left a comment
There was a problem hiding this comment.
LGTM! Comprehensive API boundary tests.
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.
Summary
This PR adds comprehensive unit tests for query parameter boundary validation in the streak API route.
Changes Made
Grace Parameter Validation
grace=0)grace=7)Opacity Parameter Validation
opacity=0.1)opacity=1.0)Combined Parameter Validation
Results
Closes #3659
Description
This PR introduces a dedicated test suite to validate boundary handling and clamping behavior for the
graceandopacityquery parameters in the streak API.Pillar
Visual Preview
N/A (Test-only change)
Checklist before requesting a review:
CONTRIBUTING.mdfile.npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).README.mdif I added a new theme or URL parameter.