Commit b7cebef
authored
test(validations): verify view parameter behavior (JhaSourav07#1163)
## Description
Fixes JhaSourav07#1041
Added validation tests for the `view` parameter in `streakParamsSchema`.
The tests verify that:
* `view: "default"` is accepted
* `view: "monthly"` is accepted
* invalid values (e.g. `"radar"`) fall back to `"default"`
* omitted `view` defaults to `"default"`
## Pillar
* [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
N/A (test-only change)
## Checklist before requesting a review:
* [x] I have read the `CONTRIBUTING.md` file.
* [ ] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
* [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
* [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
* [ ] I have updated `README.md` if I added a new theme or URL
parameter.
* [x] I have started the repo.
* [x] I have made sure that i have only one commit to merge in this PR.
* [ ] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (not applicable — test-only change).
* [x] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
0 commit comments