test(android,linux,apple): flake, dead-assertion, and fixture fixes from CRAP reviews
Merged
TH
2mo ago+185+185+012345678901234567890123456789-94-94-01234567890123456789
Summary
Area 2 of #3461 (follow-ups to the #3433/#3434/#3435 reviews). Tests only; the one non-test change is a test-only export subpath (./archive-fixtures, audio-probe-fixtures precedent + R11 entry) reaching host-kit's zip fixture writer.
- Boot-timeout flake (
emulator-lifecycle.test.ts): the 80 ms/150 ms/exactly-2-calls geometry raced host scheduling; now onvi.useFakeTimers(). Mutation: dropping theBOOT_COMMAND_FAILED→ANDROID_BOOT_TIMEOUTnormalization fails it. - Dead assertion: removed
notEqual(BOOT_COMMAND_FAILED), subsumed by the reason equality. Kept "keeps original details" — deleting the details spread inbuildAndroidBootFailureDetailsfails it, so the override is load-bearing. - Linux negative controls (
snapshot.test.ts): the degenerate-rect tie gained an out-of-bounds probe (widening the inclusive bound fails it); the missing-depth test pins the default in both sort directions (mutationsdepth ?? -1/?? 1each fail one fixture). - Host-binary fixture (
install-artifact.test.ts): the IPA is written withwriteZipFixture; no hostzipshell-out. The fixture moved tosrc/archive.fixtures.ts, and its encrypted-entry helper writes the flag through the same writer. - Spent deadline (
physical-device-files.test.ts): asserts typeddetails.step/timeoutMs. - Mock scope (
host-provider.test.ts): no cast partialfs.Stats; the mocked stat answers with realfs.Statsof backing tmp paths, the userApplicationsroot is a real tmp dir, absent roots are declared. - xctestrun record target: the surviving record target names a bundle nothing else references; dropping record-target collection or the
isRecordfilter fails it alone.
Validation
- Tested/pushed SHA:
fe44548d8. pnpm check:affected --run: passed under the machine lock.- Each mutation observed failing, then reverted.
check:layering,check:fallow,typecheck,lint,format:checkpass.