test(acp): add missing coverage for extensions command error paths#25313
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces comprehensive test coverage for error handling within the ACP extension management commands. By explicitly testing failure states for disabling and uninstalling extensions, the changes ensure that the CLI provides consistent and accurate error feedback to users, preventing potential regressions in command output. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new test file, packages/cli/src/acp/commands/extensions.test.ts, which focuses on verifying the error handling logic for the DisableExtensionCommand and UninstallExtensionCommand. The tests mock the ExtensionManager and core error utility to ensure that failed operations return the correct error messages. I have no feedback to provide.
|
Thank you sir for merging the PR, i have also raised PR #26312 and waiting for its approval |
…oogle-gemini#25313) Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
…oogle-gemini#25313) Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>

Summary
Adds missing ACP test coverage for extension command error paths in disable/uninstall flows.
Details
packages/cli/src/acp/commands/extensions.test.tsreturns error when disabling failsreturns error when uninstalling a non-existent extensionWhy
DisableExtensionCommandandUninstallExtensionCommandalready handle these failures, but explicit tests were missing for regression protection of user-facing output.Testing
npm run test --workspace @google/gemini-cli -- src/acp/commands/extensions.test.tsnpx vitest run src/acp/commands/extensions.test.tsnpm run preflighton Windows hityamllintcommand parsing issue inscripts/lint.js(grep/xargspipeline), unrelated to this change.Related issues
Related to #22934