Skip to content

test: remove 151 unit tests fully covered by integration tests#595

Open
thymikee wants to merge 1 commit into
mainfrom
worktree-coverage-overlap-analysis
Open

test: remove 151 unit tests fully covered by integration tests#595
thymikee wants to merge 1 commit into
mainfrom
worktree-coverage-overlap-analysis

Conversation

@thymikee
Copy link
Copy Markdown
Member

Summary

  • Ran per-individual-test v8 coverage analysis comparing each of the 1,831 unit tests against the provider-integration suite
  • Identified 151 tests where every statement and branch they exercise is already covered by integration tests
  • Deleted 8 fully redundant test files and removed 132 individual tests from 54 files
  • 2,598 lines of test code removed with zero coverage regression

Coverage before/after

Metric Before After Threshold
Statements 82.4% 82.41% 78% ✅
Branches 71.94% 71.96%
Functions 89.76% 89.76%
Lines 84.49% 84.5% 80% ✅

Files deleted entirely (8)

  • src/__tests__/artifacts-public.test.ts
  • src/__tests__/client-public.test.ts
  • src/__tests__/package-exports.test.ts
  • src/commands/react-native/__tests__/overlay.test.ts
  • src/core/__tests__/dispatch-screenshot.test.ts
  • src/daemon/handlers/__tests__/snapshot-routing.test.ts
  • src/utils/__tests__/device-isolation.test.ts
  • src/utils/__tests__/video.test.ts

Methodology

  1. Generated v8 coverage JSON for integration tests (vitest run --project provider-integration --coverage)
  2. For each of the 1,831 unit tests, ran it in isolation with coverage (vitest run --testNamePattern "^exact name$" --coverage)
  3. Compared every covered statement and branch against the integration coverage map
  4. A test is "redundant" only if every single statement and branch it covers is also covered by integration tests — zero gaps allowed
  5. After removal, ran full vitest run --coverage to confirm all remaining tests pass and thresholds hold

Test plan

  • All 1,723 remaining unit tests pass
  • Coverage thresholds (78% statements, 80% lines) still met
  • CI passes

Per-test coverage analysis confirmed every statement and branch these
tests exercise is already covered by the provider-integration suite.
Removes 8 fully redundant test files and 132 individual tests from
54 files (2,598 lines). Coverage unchanged at 82.4% statements / 84.5%
lines, both above configured thresholds.
@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-595/

Built to branch gh-pages at 2026-05-26 16:20 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

platform: string;
contentType: string;

P1 Badge Keep fallback-path test for signed upload failures

This removal drops the only test that verifies uploadArtifact falls back to legacy /upload when either the signed PUT upload or /upload/finalize fails (503). The remaining tests still cover preflight fallback and happy-path direct upload, but not this degraded-path behavior, so a regression here would surface as production upload failures during transient storage/finalize outages.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines -30 to -31
assert.equal(pkg.exports['./android-apps'], undefined);
assert.equal(pkg.exports['./daemon'], undefined);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore package export-map contract test

Deleting this file removes the only check that package.json exports exactly the supported public subpaths and keeps internal ones (./android-apps, ./daemon) unexported. Provider integration coverage can execute the same runtime code without validating the published export map, so a future exports regression would pass CI here but break consumers at import time after release.

Useful? React with 👍 / 👎.

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