Skip to content

Revert "test: improve coverage for use command"#10418

Merged
joehan merged 1 commit intonextfrom
revert-10345-test/use-command
Apr 24, 2026
Merged

Revert "test: improve coverage for use command"#10418
joehan merged 1 commit intonextfrom
revert-10345-test/use-command

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Apr 24, 2026

Reverts #10345

@joehan joehan enabled auto-merge (squash) April 24, 2026 21:05
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request deletes the unit test suite for the use command, which covers critical functionality such as project alias management and error handling. Feedback indicates that removing these tests results in a significant loss of coverage for a core CLI feature and violates the repository's style guide regarding testing edge cases. It is recommended to refactor and improve the existing tests rather than deleting them without a replacement.

I am having trouble creating individual review comments. Click here to see my feedback.

src/commands/use.spec.ts (1-128)

medium

Removing the unit tests for the use command results in a significant loss of test coverage for a core CLI feature. According to the repository style guide (lines 45-46), unit tests should be co-located with their source files and should cover both happy paths and edge cases. If the previous implementation of these tests was problematic (e.g., due to excessive mocking or the use of any types as seen on line 44), it is preferable to refactor and improve them rather than removing them entirely without a replacement.

References
  1. Unit tests (*.spec.ts) should be co-located with their source files. (link)
  2. Test error cases and edge conditions, not just the 'happy path'. (link)
  3. Never use any or unknown as an escape hatch. (link)

@joehan joehan disabled auto-merge April 24, 2026 21:14
@joehan joehan merged commit ec56f9f into next Apr 24, 2026
62 of 63 checks passed
@joehan joehan deleted the revert-10345-test/use-command branch April 24, 2026 21:14
wandamora pushed a commit that referenced this pull request Apr 24, 2026
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.

2 participants