google-github-actions / google-github-actions/run-gemini-cli
Add unit tests for critical logic in Typescript package
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 285
- Avg merge
- 8h 8m
- Merged PRs (30d)
- 1
Description
Description:
Currently, there are no apparent automated tests for the run-gemini-cli action. To ensure the reliability and correctness of the action, comprehensive test coverage is required, especially for the critical logic branches identified during refactoring.
Depends on https://github.com/google-github-actions/run-gemini-cli/issues/373
Specific testing requirements:
- Unit Tests for TypeScript Modules:
- Develop unit tests for all functions and modules created during the refactoring process (e.g., input validation, installation logic, telemetry upload).
- Achieve high code coverage for these modules, focusing on all conditional branches and edge cases.
- Mocking External Dependencies:
- Mock external calls (e.g.,
npm,git,docker,curl,gemini CLI) to ensure unit tests are fast and isolated.
- Mock external calls (e.g.,
Acceptance Criteria:
- A testing framework is integrated into the project.
- Unit tests are written for all refactored TypeScript modules.
- Test coverage reports demonstrate significant coverage of the action's core logic.
- Tests can be run easily via a
npmscript.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the refactoring tracked in issue 373 and identify the TypeScript modules and critical branches it introduced, including input validation, installation logic, and telemetry upload. Choose a testing framework, mock the listed external calls, and add an npm script to run the tests. Done means the refactored modules have significant branch coverage and produce a coverage report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100