[No QA] Remove unsafe type assertions from APITest.ts tests#96776
Draft
KJ21-ENG wants to merge 2 commits into
Draft
[No QA] Remove unsafe type assertions from APITest.ts tests#96776KJ21-ENG wants to merge 2 commits into
KJ21-ENG wants to merge 2 commits into
Conversation
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
Removed
@typescript-eslint/no-unsafe-type-assertionviolations fromtests/unit/APITest.tsas part of the cleanup for Expensify/App issue #94739.What changed:
READ_COMMANDSandWRITE_COMMANDSconstants.Why this approach is safe:
tests/unit/APITest.ts.mainintroduced no Knip findings.Reviewer focus:
Safety checks:
Fixed Issues
$ #94739
PROPOSAL: #94739 (comment)
Count change
Current baseline source:
config/eslint/eslint.seatbelt.tsvBefore:
tests/unit/APITest.ts: 61 violationsAfter:
tests/unit/APITest.ts: 0 violationsNet reduction:
@typescript-eslint/no-unsafe-type-assertionviolations.TSV evidence:
main.Tests
npm run lint -- --show-warnings tests/unit/APITest.tsCI=true npm run lint -- --no-cache --show-warnings tests/unit/APITest.tsnpm run test -- tests/unit/APITest.tsFocused lint, writable lint evidence, formatter checks, React Compiler checks, and all focused Jest tests passed on the exact signed publication head.
Offline tests
Not applicable because this is a test-only type-safety cleanup with no network behavior.
QA Steps
Not applicable because production behavior and UI code are unchanged.
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
Android: Native
Not applicable because there are no UI changes; this cleanup only changes a unit test.
iOS: Native
Not applicable because there are no UI changes; this cleanup only changes a unit test.
Android: Chrome
Not applicable because there are no UI changes; this cleanup only changes a unit test.
iOS: Safari
Not applicable because there are no UI changes; this cleanup only changes a unit test.
Desktop: Chrome/Safari/Firefox
Not applicable because there are no UI changes; this cleanup only changes a unit test.