Summary of What Needs to be Done:
Add unit tests for the digest-email.ts utility module covering esc, pluralise, langColour, buildDigestHtml, and buildDigestText functions.
Changes that Need to be Made:
- Create test/digest-email.test.ts
- Add tests for esc function (HTML escaping)
- Add tests for pluralise (singular/plural forms)
- Add tests for langColour (returns correct hex or fallback)
- Add tests for buildDigestHtml (greeting, weekLabel, unsubscribe, streak, activity, languages, repos, HTML escaping)
- Add tests for buildDigestText (greeting, streak with emoji, activity, languages with percentages, repos)
Impact that it would Provide:
Increases test coverage for the lib directory and ensures email template generation handles all edge cases correctly.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.
Summary of What Needs to be Done:
Add unit tests for the digest-email.ts utility module covering esc, pluralise, langColour, buildDigestHtml, and buildDigestText functions.
Changes that Need to be Made:
Impact that it would Provide:
Increases test coverage for the lib directory and ensures email template generation handles all edge cases correctly.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.