test(platform-apple): cover core launch diagnostics, CoreDevice normalization, runner-file copy, and IPA hint resolution
Merged
TH
2mo ago+491+491+012345678901234567890123456789-0-0-0123456789
Summary
Covers the five 0%-covered functions in platform-apple core flagged by the coverage-based CRAP report on 5f84627d8, all through the owning modules' public entry points (probeSimulatorLaunchContext, ensureCoreDeviceReady, copyCoreDeviceRunnerFile, prepareIosInstallArtifact). No production changes, no new exports, no test-only DI.
| Function | CRAP before → after |
|---|---|
probeSimulatorLaunchContext | 56 → 7 |
normalizeCoreDeviceProbeError | 56 → 7 |
normalizeCoreDeviceReadyError | 42 → 6 |
copyCoreDeviceRunnerFile | 30 → 5 |
resolveIosPayloadBundleByHint | 30 → 5 |
The ambiguous-name throw in resolveIosPayloadBundleByHint stays uncovered: it needs two payload directories differing only by case, which APFS cannot hold; with that branch excluded the function scores 5.
Closes #3417. Part of #3414. 4 test files changed, +472 lines.
Validation
- Tested SHA:
6aa85ad(review fixes on top ofa590340) pnpm check:affected --runpassed locally under the machine lock (format, lint, typecheck, layering, fallow, vitest-related, unit).pnpm check:coverage-crap --allovervitest relatedcoverage for the owned files: no function at or above 30. Per-function CRAP viafallow healthat ~full statement coverage: 7, 7, 6, 5, 5.- Mutation spot-checks (dropped guards, inverted hint ternary, removed retry/return, removed dotted-hint gate) each failed at least one new test.