Commit c2b038f
authored
style(test): format sanitizeFont tests (JhaSourav07#609)
## Description
Fixes JhaSourav07#343
Expanded test coverage for `sanitizeFont` in
`lib/svg/sanitizer.test.ts`.
### Added edge case tests
* null input returns null
* whitespace-only input returns null
* valid font names with spaces are preserved
* numeric font names are allowed
* script injection attempts are sanitized
* invalid characters that sanitize to empty return null
## Pillar
* [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
N/A (test-only changes)
## 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 format` and `npm run lint` locally and
resolved all errors.
* [x] My commits follow the Conventional Commits format.
* [ ] I have updated `README.md` if needed.
* [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).
* [ ] (Recommended) I joined the CommitPulse Discord community.
Close JhaSourav07#3431 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
100 | 124 | | |
101 | 125 | | |
102 | 126 | | |
| |||
0 commit comments