[No QA] Remove unsafe type assertions from IOU cleanup tests - #97327
Open
KJ21-ENG wants to merge 2 commits into
Open
[No QA] Remove unsafe type assertions from IOU cleanup tests#97327KJ21-ENG wants to merge 2 commits into
KJ21-ENG wants to merge 2 commits into
Conversation
|
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Contributor
Reviewer Checklist
|
ikevin127
approved these changes
Aug 2, 2026
ikevin127
left a comment
Contributor
There was a problem hiding this comment.
🟢 LGTM
No actionable changes. 96 violations removed across 10 files using only vetted patterns, with the strongest reuse of shared infrastructure I have seen in this series.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Replace unsafe type assertions in the ten issue 94739 cleanup test targets with production-linked types, repository-native typed mocks, direct typed fixtures, and narrower test boundaries. Runtime behavior, test scenarios, and assertion meaning are preserved.
Fixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Count change
Current baseline source:
config/eslint/eslint.seatbelt.tsvBefore:
tests/actions/IOU/SplitReportTotalsTest.ts: 10 violationstests/actions/IOUTest/ReceiptTest.ts: 9 violationstests/actions/PersonalDetailsTest.ts: 10 violationstests/navigation/isActiveRouteTests.tsx: 9 violationstests/ui/IOURequestStepDistanceTest.tsx: 9 violationstests/ui/ReportActionItemTest.tsx: 9 violationstests/ui/hooks/useHtmlPasteTest/index.tsx: 10 violationstests/unit/OnboardingSelectorsTest.ts: 10 violationstests/unit/PolicySelectorTest.ts: 10 violationstests/unit/selectors/CardTest.ts: 10 violationsAfter:
tests/actions/IOU/SplitReportTotalsTest.ts: 0 violationstests/actions/IOUTest/ReceiptTest.ts: 0 violationstests/actions/PersonalDetailsTest.ts: 0 violationstests/navigation/isActiveRouteTests.tsx: 0 violationstests/ui/IOURequestStepDistanceTest.tsx: 0 violationstests/ui/ReportActionItemTest.tsx: 0 violationstests/ui/hooks/useHtmlPasteTest/index.tsx: 0 violationstests/unit/OnboardingSelectorsTest.ts: 0 violationstests/unit/PolicySelectorTest.ts: 0 violationstests/unit/selectors/CardTest.ts: 0 violationsNet reduction:
TSV evidence:
Tests
Focused verification passed for all ten targets:
oxfmt.git diff --check.Offline tests
N/A — this is a test-only type-safety cleanup with no network or runtime behavior changes.
QA Steps
N/A — the title starts with [No QA] and no product behavior changed.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
N/A — test-only cleanup; no product UI changed, so screenshots or videos are not applicable.
Changed files (10)
tests/actions/IOU/SplitReportTotalsTest.tstests/actions/IOUTest/ReceiptTest.tstests/actions/PersonalDetailsTest.tstests/navigation/isActiveRouteTests.tsxtests/ui/IOURequestStepDistanceTest.tsxtests/ui/ReportActionItemTest.tsxtests/ui/hooks/useHtmlPasteTest/index.tsxtests/unit/OnboardingSelectorsTest.tstests/unit/PolicySelectorTest.tstests/unit/selectors/CardTest.ts