Follow-up to #5. Builds on the vitest infra and the temp-dir pattern established in src/core/settings.spec.ts.
Scope
src/commands/uninstall.ts. Drive cmdUninstall against a temp dir.
Cases to cover
- Removes only our block: with a tokenline
statusLine present (detected via isTokenlineCommand), it deletes just that key, backs up first (settings.json.bak), and leaves unrelated keys intact.
- Foreign
statusLine left untouched: a non-tokenline statusLine is not removed.
- No usable settings: missing file or invalid JSON → warns, changes nothing.
--purge also deletes the installed tokenline.sh; without --purge the script stays.
--dry-run writes nothing and deletes nothing (both the settings edit and the purge).
- Exit codes behave as expected.
Acceptance
pnpm test stays green locally and in CI.
- The cases above are covered.
Follow-up to #5. Builds on the vitest infra and the temp-dir pattern established in
src/core/settings.spec.ts.Scope
src/commands/uninstall.ts. DrivecmdUninstallagainst a temp dir.Cases to cover
statusLinepresent (detected viaisTokenlineCommand), it deletes just that key, backs up first (settings.json.bak), and leaves unrelated keys intact.statusLineleft untouched: a non-tokenlinestatusLineis not removed.--purgealso deletes the installedtokenline.sh; without--purgethe script stays.--dry-runwrites nothing and deletes nothing (both the settings edit and the purge).Acceptance
pnpm teststays green locally and in CI.