test(ios): cover the snapshot bridge source-root resolution

Merged
TH
1d ago
+41-0

Summary

Adds the unit-lane test that #3974's cache.ts change needed. That PR deleted the dist/apple/snapshot-bridge packaged fallback in resolveSnapshotBridgeSourceRoot; the maintainer merged it before this test landed, so the merged head failed the changed-line coverage gate (0/3) and main's single-root resolver has no unit coverage today. Test-only: one test asserting the two outcomes — the root-relative apple/snapshot-bridge directory resolves, and a project root without it reports native-source-missing. The setup writes exactly SNAPSHOT_BRIDGE_SOURCE_FILENAMES (the list the resolver checks) and one shared options object varies only projectRoot. 1 file.

Validation

Head 6511d57893 on a16d437237.

  • pnpm check:affected --run --head 6511d57893: all runnable checks passed, exactCommit=true.
  • cache.test.ts: 7 passed.
  • Mutant (disposable git worktree at this head's tree, per test-audit): break the root check's path (apple/snapshot-bridge → apple) → this test fails (1 failed | 6 passed; baseline 7 passed).
  • Test-only: no device lane, no nightly obligation.
  • Self-review: no independent reviewer was available in this worker; the diff was re-read cold.

git diff --stat origin/main...HEAD:

 .../src/snapshot-source/cache.test.ts              | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Size Report: test-only, expect 0 B.

šŸ¤– Generated with Claude Code