mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Added a new test file `tests/unit/comment-avatar.test.mjs` to comprehensively test the `commentAvatar.js` utility. The tests cover: - `normalizeCommentAvatarKey`: Verifies input sanitization and normalization. - `resolveCommentAvatarAsset`: Verifies avatar resolution logic including defaults, failure handling, and caching strategies. - `registerCommentAvatarFailure`: Verifies failure registration and cache invalidation. This ensures robust handling of user avatars in comments, including edge cases like missing or failed images and cache persistence. Co-authored-by: PR0M3TH3AN <[email protected]>