Skip to content

Add unit tests for critical logic in Typescript package #375

Description

@jerop

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 #373

Specific testing requirements:

  1. 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.
  2. Mocking External Dependencies:
    • Mock external calls (e.g., npm, git, docker, curl, gemini CLI) to ensure unit tests are fast and isolated.

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 npm script.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions