Skip to content

test(sdk): GeminiCliSession has no unit tests #21895

@AdamyaSingh7

Description

@AdamyaSingh7

Description

packages/sdk/src/session.ts is the core session class in the public SDK (272 lines), but has zero unit tests. Only integration tests exist in the package.

What's missing

  • Constructor validation (instructions must be string or function)
  • id getter behavior
  • initialize() idempotency
  • sendStream() basic behavior

Proposed fix

Add packages/sdk/src/session.test.ts with unit tests using mocked Config from @google/gemini-cli-core.

Metadata

Metadata

Assignees

Labels

area/platformIssues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmthelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p2Important but can be addressed in a future release.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions