[No QA] Remove unsafe type assertions from ReportSecondaryActionUtilsTest.ts#1
Closed
KJ21-ENG wants to merge 10000 commits into
Closed
[No QA] Remove unsafe type assertions from ReportSecondaryActionUtilsTest.ts#1KJ21-ENG wants to merge 10000 commits into
KJ21-ENG wants to merge 10000 commits into
Conversation
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/ReportSecondaryActionUtilsTest.tsas part of the cleanup for Expensify/App issue Expensify#94739.What changed:
Report,Policy, andTransactionassertions withcreateMock<T>.anycasts with typed mock definitions.jest.mockedfor theisPolicyAdminmocks.Why this approach is safe:
Reviewer focus:
Fixed Issues
$ Expensify#94739
PROPOSAL: Expensify#94739 (comment)
Count change
Current baseline source:
config/eslint/eslint.seatbelt.tsvBefore:
tests/unit/ReportSecondaryActionUtilsTest.ts: 31 violationsAfter:
tests/unit/ReportSecondaryActionUtilsTest.ts: 0 violationsNet reduction:
@typescript-eslint/no-unsafe-type-assertionviolations.TSV evidence:
Tests
npm run lint -- --show-warnings tests/unit/ReportSecondaryActionUtilsTest.ts
CI=true npm run lint -- --no-cache --show-warnings tests/unit/ReportSecondaryActionUtilsTest.ts
npm run test -- tests/unit/ReportSecondaryActionUtilsTest.ts
The focused Jest suite passed all 165 tests. Focused lint, formatting, TSV restoration, and diff hygiene also passed.
Offline tests
Not applicable: this test-only cleanup adds no network behavior.
QA Steps
Not applicable: production behavior and UI are unchanged.
PR Author Checklist
Screenshots/Videos
Not applicable: only a unit-test source file changed.