Skip to content

test: remove duplicate and theatrical tests#2677

Merged
louisgv merged 2 commits intomainfrom
qa/dedup-scanner
Mar 16, 2026
Merged

test: remove duplicate and theatrical tests#2677
louisgv merged 2 commits intomainfrom
qa/dedup-scanner

Conversation

@la14-1
Copy link
Member

@la14-1 la14-1 commented Mar 16, 2026

Summary

  • Consolidated 4 redundant mirror-cmd tests in agent-tarball.test.ts into one test with shared beforeEach setup (all 4 were calling the same tryTarballInstall and inspecting the same mirrorCmd string)
  • Merged 3 identical-setup dry-run tests in cmdrun-happy-path.test.ts into one consolidated test
  • Merged 2 same-invocation launch-message tests into one (one cmdRun call, two assertions)

Net result: 1417 → 1411 tests (-6 redundant tests), 0 regressions, biome lint clean.

Test plan

  • bun test passes (1411 pass, 0 fail)
  • bunx @biomejs/biome check src/ passes (0 errors)
  • No test coverage was removed — all unique assertions are preserved

-- qa/dedup-scanner

Consolidated redundant test setups in agent-tarball and cmdrun-happy-path
test suites:

- agent-tarball.test.ts: merged 4 mirror-cmd tests (all invoking the same
  tryTarballInstall call and inspecting the same mirrorCmd string) into a
  single test with shared beforeEach setup. Retained the non-fatal failure
  test separately since it has a different mock setup.

- cmdrun-happy-path.test.ts: collapsed 3 identical-setup dry-run tests into
  one consolidated test, and merged the two same-invocation launch-message
  tests into one. Each removed test was a pure duplicate of setup + assertion
  that could be expressed as additional expects in the same test.

Net: 1417 → 1411 tests (-6), 0 regressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

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

Security Review

Verdict: APPROVED
Commit: 0fa095e

Findings

No security issues identified. This PR consolidates duplicate test cases without modifying production code or shell scripts.

Changes analyzed:

  • packages/cli/src/__tests__/agent-tarball.test.ts: Merged 4 separate test cases into a single comprehensive test using beforeEach setup. All assertions preserved.
  • packages/cli/src/__tests__/cmdrun-happy-path.test.ts: Merged 3 separate dry-run tests and 2 launch message tests into comprehensive tests. All assertions preserved.

Tests

  • bun test: PASS (1411/1411 tests passing)
  • bash -n: N/A (no shell scripts modified)
  • curl|bash: N/A (no shell scripts modified)
  • macOS compat: N/A (no shell scripts modified)

Security Assessment

  • No code injection vectors
  • No credential handling
  • No shell script modifications
  • No external API calls introduced
  • Pure test refactoring with identical coverage

-- security/pr-reviewer

@louisgv louisgv merged commit 0f0bdf2 into main Mar 16, 2026
5 checks passed
@louisgv louisgv deleted the qa/dedup-scanner branch March 16, 2026 05:20
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