Skip to content

test: add coverage for installAll() - #100

Merged
kmturley merged 1 commit into
mainfrom
test/install-all-coverage
Jul 31, 2026
Merged

test: add coverage for installAll()#100
kmturley merged 1 commit into
mainfrom
test/install-all-coverage

Conversation

@kmturley

Copy link
Copy Markdown
Member

Summary

  • installAll() had zero test coverage — the last of the three untested methods (create/installAll/open) flagged in an internal spec-compliance audit; create and open were covered in earlier PRs ([fix] Make create command persist metadata instead of always throwing #91, [fix] Let open() propagate errors instead of swallowing them #98).
  • Adds two tests: the happy path (installs every package currently in listPackages() and returns them with installed: true) and the unprivileged-elevation branch (mirrors the existing install() elevation tests).
  • The happy-path test seeds a single known package directly via addPackage() rather than sync()'ing the live registry, so its network footprint stays fixed regardless of how many packages the real registry ends up with.

Test plan

  • npm run check passes (format, lint, build, tests — 205/205)

🤖 Generated with Claude Code

installAll() had zero test coverage, the last of the three untested
methods (create/installAll/open) flagged in an internal spec-compliance
audit - create and open were covered in earlier PRs.

Adds two tests: the happy path (installs every package currently in
listPackages() and returns them with installed=true) and the
unprivileged-elevation branch (mirrors the existing install()
elevation tests). The happy-path test seeds a single known package
directly via addPackage() rather than sync()'ing the live registry, so
its network footprint stays fixed regardless of how many packages the
real registry ends up with.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kmturley
kmturley merged commit dd4738f into main Jul 31, 2026
6 checks passed
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.

1 participant