Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unit tests across the repository #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mouismail
Copy link
Owner

@mouismail mouismail commented May 22, 2024

Implements comprehensive unit tests across the repository to improve test coverage and validate critical functionalities.

  • GitHub and GitLab Integration Tests: Adds actual test cases with assertions for GetRepos functions in github/github_test.go and gitlab/gitlab_test.go, utilizing mock HTTP servers to simulate API responses. Tests validate successful data retrieval and error handling for both GitHub and GitLab repositories.
  • Readme and Stats Package Tests: Implements test cases in pkg/readme/readme_test.go and pkg/stats/stats_test.go to validate file operations and the functionalities of the Table struct, including table creation, row addition, and string representation.
  • Bitbucket Package Tests: Introduces unit tests for the bitbucket package in bitbucket/bitbucket_test.go, testing the GetRepos function with a mock HTTP server to simulate Bitbucket API responses and validate repository parsing and error scenarios.
  • Command Package Tests: Adds unit tests for the cmd package in cmd/root_test.go and cmd/start_test.go, testing command execution, argument parsing, and flags parsing for the root and start commands.

For more details, open the Copilot Workspace session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant