Skip to content

test : add unit tests for goals-sync-utils.ts #2862

Description

@tmdeveloper007

Summary of What Needs to be Done:
Add unit tests for the goals-sync-utils.ts utility module covering extractValidRepoFromGoal function.

Changes that Need to be Made:

  • Create test/goals-sync-utils.test.ts
  • Add tests for extractValidRepoFromGoal with valid repo from 'repo', 'repository', and 'repo_name' fields
  • Add tests for field precedence (repo > repository > repo_name)
  • Add tests for null/undefined/empty/whitespace values in all fields
  • Add tests for invalid GitHub repo identifier formats
  • Add tests for whitespace trimming

Impact that it would Provide:
Increases test coverage and ensures repository extraction from goal rows handles all field variations and rejects invalid formats.

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