[No QA] Remove unsafe assertions from shared test utilities - #98485
Open
KJ21-ENG wants to merge 1 commit into
Open
[No QA] Remove unsafe assertions from shared test utilities#98485KJ21-ENG wants to merge 1 commit into
KJ21-ENG wants to merge 1 commit into
Conversation
Contributor
Author
|
@ikevin127 Could you please take a look at this when you get a chance? Thanks! |
|
@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
|
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
This test-only cleanup removes three
@typescript-eslint/no-unsafe-type-assertionfindings from three shared test utility files. It replaces broad assertions with production-derived types, narrow compiler-checked invalid-fixture boundaries, and directly typed mock objects while preserving existing runtime fixture behavior.Fixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Count change
Current baseline source:
config/eslint/eslint.seatbelt.tsvat baseff34e26e822b678c7cb1f300996dde35fca7532crecords the baseline for@typescript-eslint/no-unsafe-type-assertion.Before:
tests/utils/collections/paymentMethods.ts: 1tests/utils/collections/reportActions.ts: 1tests/utils/createSharedValueMock.ts: 1After:
Net reduction:
@typescript-eslint/no-unsafe-type-assertionfindings across the 3 target files.TSV evidence:
Tests
fc5ebf3a31f329bff62abcfd702d8632232caa7c2046ad0e4bef742d6115adedpassed cleanup counting, formatting, lint, changed-path checks, andgit diff --checkfor exact diffsha256:d63c69fc59faaa54766dacd0f69388164b7fc9aa1f97d7b98267f86acb62f031.src/components/AddressSearch/index.tsxdiagnostic.31630306799passed typecheck, lint, format, React Compiler, and Jest for signed commit79e2b117b2e37de6560070215a5a6dc2be0fb75ausing immutable workflowseatbelt-ci-v1@0e497c4fa0cbf7e9d776701e9307afe34083a8d0.Offline tests
N/A — this is a test-only type-safety cleanup; it changes no application runtime or network behavior, and no manual offline test was performed.
QA Steps
N/A — this is a test-only cleanup and the title starts with
[No QA]; no staging or production manual QA was performed.PR Author Checklist
Each checklist item below is checked because it was considered. Platform, staging or production, offline, screenshot or video, high-traffic, console, and product-component testing are N/A for this test-only cleanup; the automated evidence is listed in
### Tests.### 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 — no UI or visual behavior changed; no screenshots or videos were produced.
Changed files (3)
tests/utils/collections/paymentMethods.tstests/utils/collections/reportActions.tstests/utils/createSharedValueMock.ts