Skip to content

ref(tests): replace as jest.Mock casts with jest.mocked()#115790

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked-
May 19, 2026
Merged

ref(tests): replace as jest.Mock casts with jest.mocked()#115790
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked-

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

Replaces 75 occurrences of as jest.Mock type assertions with the jest.mocked() helper across 26 test files. jest.mocked() is the idiomatic approach — it preserves the original type while narrowing to the mock interface, whereas as jest.Mock is an unsafe cast.

This is a pure mechanical change with no behavioral differences.

@evanpurkhiser evanpurkhiser requested review from a team as code owners May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested a review from JonasBa May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested review from a team as code owners May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested a review from joshuarli May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested a review from a team as a code owner May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested a review from obostjancic May 19, 2026 14:16
@evanpurkhiser evanpurkhiser requested a review from a team as a code owner May 19, 2026 14:16
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.56%

@evanpurkhiser evanpurkhiser enabled auto-merge (squash) May 19, 2026 14:21
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch from 423929b to 42526fa Compare May 19, 2026 14:43
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch from 206d458 to d42e3fb Compare May 19, 2026 15:05
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch from 3cc6854 to fabcde3 Compare May 19, 2026 15:29
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch from f6f86c0 to 00161e0 Compare May 19, 2026 15:51
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch from f6f9376 to ca5127b Compare May 19, 2026 20:49
@evanpurkhiser evanpurkhiser merged commit fdada82 into master May 19, 2026
71 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-tests-replace-as-jest-mock-casts-with-jest-mocked- branch May 19, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants