Skip to content

test : add unit tests for fetchUserRepos function #686

@tmdeveloper007

Description

@tmdeveloper007

Summary of What Needs to be Done:
Add unit tests for the fetchUserRepos function in src/lib/github.ts. Tests must use vitest framework and import actual source code.

Changes that Need to be Made:

  • Create test using vitest describe/it/expect
  • Import fetchUserRepos from src/lib/github.ts
  • Test makes correct API call with auth header
  • Test throws error on non-ok response
  • Test constructs correct endpoint

Impact that it would Provide:

  • Ensures GitHub API calls are correctly formed
  • Validates error handling for API failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions