Repository navigation
test(mobile): split the turn-disclosure test under the 800-line test limit - #25933
Conversation
…riginal file's existing type errors
…lt component, not a host string) and prune the baseline
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe change adds a shared test fixture for Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change reorganizes tests only and does not alter product behavior. The remaining step is confirming that CI's Mobile Checks pass. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
Main's Lint check is red. A mobile test file,
mobile/src/session/use-mobile-native-chat-turn-disclosure.test.tsx, grew past the 800-line limit for test files (816 counted lines when #19221 landed, 875 now). When Lint fails, CI skips typecheck and every unit test shard, so every PR that merges current main currently gets no real CI signal.What Changed
Test-only split, no behaviour change:
it.each(hosts)cases with theirjournalOf/said/recordhelpers) move touse-mobile-native-chat-turn-disclosure-journal.test.tsx, under their owndescribewith the same render/unmount setup.Harnesscomponent anduserMessagehelper move touse-mobile-native-chat-turn-disclosure.test-fixture.tsxso both files use one copy.mobile/tsconfig.test.json: the harness renders a smallResultcomponent instead of a'result'host string (React Native'sElementTypehas no string members), and the tests read it withfindByType(Result). So the original file comes offmobile/tests-typecheck-baseline.txt(the ratchet list shrinks by one) and the new journal file is checked from the start.Line counts: 564 + 284 (+ 50 fixture), down from 875.
Why
Splitting by the test's own seam (journal-backed vs. message-only cases) keeps each file cohesive, instead of raising the limit or disabling the rule.
Linked Issue
None. This fixes main's Lint after #19221.
Visual Proof
N/A: test files only.
Testing
oxlint (root config and
mobile/.oxlintrc.json) and oxfmt are clean on all three files.tsc -p mobile/tsconfig.test.jsonreports no errors in either turn-disclosure test file. The tests themselves run in CI's Mobile Checks.Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No production code touched; no effect on platforms, SSH or the runtime.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)