What
normalizeGithub in lib/members.ts turns whatever a member typed into a bare GitHub username, or undefined.
There are no tests for it yet.
Cover at least
How
- Create
lib/members.test.ts next to the code. Follow the style of lib/github-auth.test.ts.
- Run
npm test. Then break the code on purpose (flip a condition) and watch at least one of your tests fail. Paste that failure output in the PR description, then undo the break.
- Test behaviour through the exported function only. Don't change the source file unless you find a bug, and if you do, stop and comment on this issue first.
Size: ~30–60 lines of tests, 0 lines of source.
Taking this? Comment /assign and the bot assigns you if it's free. One issue per person at a time; comment /unassign to hand it back. That's milestone 2 of the 10 PR Journey. Setup, the checks CI runs, and how to open the PR from your fork are in CONTRIBUTING.md. Put Fixes #<this issue> in your PR description.
What
normalizeGithubinlib/members.tsturns whatever a member typed into a bare GitHub username, orundefined.There are no tests for it yet.
Cover at least
https://github.com/user,github.com/user/,www.github.com/user?tab=repos→userundefinednull,undefinedand""→undefinedHow
lib/members.test.tsnext to the code. Follow the style oflib/github-auth.test.ts.npm test. Then break the code on purpose (flip a condition) and watch at least one of your tests fail. Paste that failure output in the PR description, then undo the break.Size: ~30–60 lines of tests, 0 lines of source.
Taking this? Comment
/assignand the bot assigns you if it's free. One issue per person at a time; comment/unassignto hand it back. That's milestone 2 of the 10 PR Journey. Setup, the checks CI runs, and how to open the PR from your fork are in CONTRIBUTING.md. PutFixes #<this issue>in your PR description.