Revert "test: improve coverage for use command"#10418
Conversation
This reverts commit 9ae31c3.
There was a problem hiding this comment.
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)
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.
Reverts #10345