Skip to content

Refactor storage.ts into testable modules and add unit tests #588

@EhabY

Description

@EhabY

storage.ts is a large, tightly coupled file that mixes core logic with direct vscode usage, making it hard to test. Split it into small, focused modules and add unit tests for the core logic using a thin vscode adapter/mocks.

Proposal

  • Extract core storage logic (try to remove vscode imports or simply mock them in tests).
  • Introduce simple interfaces (e.g., BinaryManager, CliConfigManager, MementoManager, SecretsManager).
  • Write unit tests for core; adapter tests can use a minimal mock.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions