Skip to content

Prune tautological, outmoded and duplicated tests - #192

Merged
arun279 merged 1 commit into
feat/expo-nativefrom
chore/test-pruning
Oct 22, 2026
Merged

arun279 merged 1 commit into
feat/expo-nativefrom
chore/test-pruning

Conversation

@arun279

@arun279 arun279 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Part of the retroactive cleanup of #24: "PR 2: App test pruning" and "PR 3: CI test pruning in test/ci" from the 2026-10-21 cleanup audit, done as one PR because both are test pruning. Every item was re-checked against current feat/expo-native (dfad4ee) first. Each deletion below is tautological, outmoded or duplicated, and names the test that still covers its behaviour. Where only a weak test covered real behaviour, I replaced it with a better one.

App tests

Change Why Still covered by
no-flake-masks: drop allowlist, an empty array asserted to equal [] Tautology The scan assertion in the same test
Four in-memory preference fakes (prefs/_storage.ts, support/stores.ts, support/up-next.tsx, and a fourth the audit missed in episode-reminders.test.tsx) become one memoryPreferenceStorage(seed?) Duplicated Not a behaviour change; every test that used a fake now uses it
kv-contract.ts moves from core/test/support into native/__tests__/support; support/vitest.ts and its moduleNameMapper go Its only runner is the native suite; the shim existed so the web store could share it The same suite still runs against both native backends
perf-up-next.ts builds entry from support/up-next.tsx's entry() with the same values Duplicated builder The perf tests, unchanged
theme.test.ts folds into prefs-store.test.ts One store, one file The same two tests
sync-strip.test.tsx "counts the backlog" goes It repeats syncBanner's backlog copy through the strip's generic message rendering sync-contract.test.ts "surfaces a backlog only past the threshold…", and the strip's other render tests
query-keys.test.ts's literal tuples go They mirror the factory and change with every rename The prefix test stays. query-cache.test.ts now also asserts that the profile, genres and first-play queries persist. A renamed key head breaks persistence, which the tuples only caught by accident
maestro-ids.test.ts: drop the "added to Watchlist" tombstone Outmoded The positive "In Watchlist" assertion beside it
Drop export from twelve support symbols that only their own files use Dead exports None needed

CI tests

Change Why Still covered by
Drop not.toContain checks for MAESTRO_DRIVER_STARTUP_TIMEOUT, REQUIRED:, POLL_SECONDS, --dimensions=ALL, PLAY_SIZE_LIMIT_BYTES, AAB_SIZE_LIMIT_BYTES, density 480, summarize-atlas, restore-base-metrics/cue-footprint-$, measure-play-size, cue-native-ios-sizes, the response-timing variables, "Measure the merge-base simulator app", IPA_SIZE_LIMIT_BYTES and .size-limit.json Outmoded: each token appears nowhere in the repository except its own tombstone The positive assertions in the same tests (runner start line, require-green-ci.sh and the required run-id inputs, density 640, footprint's no-build checks including xcodebuild, one xcodebuild in native-ios, the Firebase limit)
Drop three continue-on-error guards in fast-validation Duplicated no-flake-masks.test.ts scans every workflow for continue-on-error
ios-daemons: drop the disable-daemons-then-boot check Duplicated ios-accessibility.test.ts, whose expected boot block already has disable-ios-daemons.sh right before simctl boot. The host-resources half stays
fast-validation and publish-update read jobs through test/support/workflow-jobs.ts One parser instead of three publish-update used to slice the release workflow from the leg to the end of the file, so the android check could search the ios leg's steps; it now reads one job
core/test/ci/render-counts.test.ts moves into test/ci/render-performance.test.ts, and the "keeps zero render-count deviation" case goes It tests a root script, and that case duplicated "rejects an introduced scenario with a different count" That test and the rest of the gate's cases

Kept, against the audit:

  • The force-avd-creation and --flatten-debug-output negatives encode live choices. The second is the only check behind "leaving screenshots in place".
  • ios-maestro-readiness pins the boot order relative to xcode-select and the runner, which no other test does.

Mutation check

Each break was applied alone, and the named test failed:

Break Failing test
syncBanner never returns the backlog banner sync-contract.test.ts "surfaces a backlog only past the threshold and the grace window"
SyncStrip stops rendering the banner message sync-strip.test.tsx "says offline in a sentence…" and others
Rename the users key head query-cache.test.ts "keeps the screens a user lands on"
Rename the genres key head query-cache.test.ts "keeps the screens a user lands on"
continue-on-error: true on native-e2e-ios-light no-flake-masks.test.ts
Boot without disable-ios-daemons.sh ios-accessibility.test.ts "turns on simulator accessibility before every iOS lane boots its simulator"
Render gate allows a deviation of 1 render-performance.test.ts "rejects an introduced scenario with a different count"

Footprint

No product code changes, so no bundle changes. Test code: 219 lines added, 358 deleted, net -139, including the moved render-count test.

pnpm check passes on Node 22.23.4.

App tests:
- Drop no-flake-masks' empty allowlist that only asserted itself.
- Fold the four in-memory preference fakes into one
  memoryPreferenceStorage with an optional seed.
- Move the key-value contract suite next to its one runner in the
  native tests, and delete the Jest stand-in for vitest it needed.
- Build the perf fixture's library entry from the shared builder.
- Fold the theme tests into the prefs store test.
- Drop the sync strip backlog test, which repeats the sync contract's
  backlog copy through the same generic rendering the strip's other
  tests check.
- Replace the literal query key tuples with assertions that the profile,
  genres and first-play queries persist, which is what a renamed key
  head would break.
- Drop a tombstone in maestro-ids and the export on twelve support
  symbols only their own files use.

CI tests:
- Drop assertions that removed mechanisms stay removed:
  MAESTRO_DRIVER_STARTUP_TIMEOUT, REQUIRED:, POLL_SECONDS, the old size
  ceilings and density, summarize-atlas, restore-base-metrics,
  measure-play-size, the response-timing variables, and the merge-base
  simulator build.
- Drop three continue-on-error guards that no-flake-masks already
  enforces for every workflow, and the daemon-before-boot check that
  ios-accessibility already pins.
- Read jobs with the shared workflow-jobs helper in fast-validation and
  publish-update.
- Move the render-count gate test to test/ci beside the workflow test,
  dropping the case it duplicated.
@github-actions

Copy link
Copy Markdown

Pull request footprint

measurement base to head
Product code lines in core/src, native/src, native/app, and native/modules +0
Test lines in test, packages/*/{test,__tests__,e2e}, and .maestro -128
CI and tooling lines in .github and scripts +0
Product comment lines identified by a comment prefix +0

User-delivered artifact sizes

measurement base head delta
Expo iOS JavaScript bundle, raw file 5.44 MB 5.44 MB 0 B
Expo Android JavaScript bundle, raw file 5.48 MB 5.48 MB 0 B
Firebase tester APK, arm64-v8a and all densities 41.16 MB 41.16 MB 0 B
Play download estimate, XXXHDPI arm64-v8a English Android 15 19.83 MB 19.83 MB 0 B

Most complex product function

measurement base head
Cyclomatic complexity, oxlint complexity 10 10
Cognitive complexity, Biome noExcessiveCognitiveComplexity 15 15

@arun279
arun279 merged commit 5e17033 into feat/expo-native Oct 22, 2026
24 checks passed
@arun279
arun279 deleted the chore/test-pruning branch October 22, 2026 20:55
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