test: tighten any types in spec mocks to Mocked<T>#5008
Merged
mengw15 merged 4 commits intoapache:mainfrom May 10, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5008 +/- ##
============================================
+ Coverage 43.35% 43.36% +0.01%
- Complexity 2182 2183 +1
============================================
Files 1035 1035
Lines 38818 38814 -4
Branches 4061 4061
============================================
+ Hits 16830 16833 +3
+ Misses 20932 20926 -6
+ Partials 1056 1055 -1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@mengw15 Please review this PR. |
Contributor
|
@Ma77Ball Does this PR completely finish the issue? I saw in the issue it says "~80 remain". If not, maybe we want to change the "Closes issue" |
Contributor
Author
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.
What changes were proposed in this PR?
let mockX: any;declarations in 13 active spec files withMocked<T>from Vitest.{...} as anymock-literal casts withas unknown as Mocked<T>(or the appropriate concrete type for component property assignments and partial fixtures).seen: any[]accumulators inpreset.service.spec.tswith the actual stream event types.(svc as any).privateFieldprivate-member access andas any as joint.dia.LinkJointJS partial-mocks.Any related issues, documentation, or discussions?
Closes: #4867
How was this PR tested?
tsc --project src/tsconfig.spec.json --noEmitpasses with no errors.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in compliance with ASF