Skip to content

[Good first issue]: Add unit tests for githubAvatarUrl helper #58

Description

@FrankezeCode

Summary

The contributor carousel uses githubAvatarUrl() from src/lib/early-contributors.ts. Add unit tests following the existing test/ pattern (CommunityId.ts, MeetupSlug.ts).

Acceptance criteria

  • New test file e.g. test/EarlyContributors.ts
  • Tests cover valid username → expected GitHub avatar URL format
  • Tests cover custom size query param when provided
  • Uses existing project test style (node:assert / node:test)
  • All tests pass when run manually
  • No production logic changes unless a bug is found and fixed

How to test

  1. Run the new test file: npx tsx test/EarlyContributors.ts (or project test command if added)
  2. Confirm all assertions pass
  3. Intentionally break URL in test locally — confirm test fails
  4. Revert and confirm green again

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions