Skip to content

test : add unit tests for repo-analytics-utils.ts #2861

Description

@tmdeveloper007

Summary of What Needs to be Done:
Add unit tests for the repo-analytics-utils.ts utility module covering parseRepoParam function.

Changes that Need to be Made:

  • Create test/repo-analytics-utils.test.ts
  • Add tests for parseRepoParam with valid owner/repo strings
  • Add tests for owner with hyphens, underscores, numbers
  • Add tests for repo with dots, hyphens, underscores
  • Add tests for whitespace trimming
  • Add tests for invalid inputs (empty string, missing slash, double slash, . and .. repos, hyphen-prefixed owner)

Impact that it would Provide:
Increases test coverage and ensures repository parameter parsing handles all valid formats and rejects malformed inputs.

Hello @Priyanshu-byte-coder, please assign this issue to me (@tmdeveloper007) so I can open a focused PR.

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