Summary of What Needs to be Done:
Add unit tests for the pure helper functions in src/lib/rooms.ts: normalizeRoomGithubUsername and githubUsernamesEqual.
Changes that Need to be Made:
- Create test/rooms-utils.test.ts
- Write tests for normalizeRoomGithubUsername: verify it delegates to normalizeGitHubUsername correctly; handles null, undefined, and empty string inputs; preserves non-null values
- Write tests for githubUsernamesEqual: verify case-insensitive comparison works; returns true for identical strings; returns false for different strings
- Use vi.mock to mock @/lib/validate-github-username for isolation if needed
Impact that it would Provide:
These two small pure functions are used throughout the collaboration rooms feature. Testing them explicitly prevents regressions when the underlying normalizeGitHubUsername function changes.
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 pure helper functions in src/lib/rooms.ts: normalizeRoomGithubUsername and githubUsernamesEqual.
Changes that Need to be Made:
Impact that it would Provide:
These two small pure functions are used throughout the collaboration rooms feature. Testing them explicitly prevents regressions when the underlying normalizeGitHubUsername function changes.
Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.