Commit c261554
authored
test: add LoC mode generator test (issue JhaSourav07#1081) (JhaSourav07#2224)
## Description
Fixes JhaSourav07#1081
Added a generator test to verify that `generateSVG` correctly renders
towers when `mode='loc'` and LoC data is present, even when the
contribution count is zero.
### Changes Made
* Created a test calendar with:
* `contributionCount: 0`
* `locAdditions: 50`
* `locDeletions: 10`
* Called `generateSVG` with `mode: 'loc'`
* Added an assertion to verify that towers are rendered
* Added an assertion to verify that the ghost city marker
(`stroke-width="0.5"`) is not rendered
### Testing
* Verified that all existing generator tests pass
* Ran lint checks successfully (0 errors)
## Pillar
* [ ] 🎨 Pillar 1 — New Theme Design
* [ ] 📐 Pillar 2 — Geometric SVG Improvement
* [ ] 🕐 Pillar 3 — Timezone Logic Optimization
* [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.
* [x] I have tested these changes locally.
* [x] I have run `npm run lint` locally.
* [x] My commits follow the Conventional Commits format.
* [ ] 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.
* [x] I joined the CommitPulse Discord community.1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
376 | 408 | | |
377 | 409 | | |
378 | 410 | | |
| |||
0 commit comments