Skip to content

Reduce any usage in a few more tests#300352

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/disturbed-mule
Mar 10, 2026
Merged

Reduce any usage in a few more tests#300352
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/disturbed-mule

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Mar 10, 2026

For #269213

Copilot AI review requested due to automatic review settings March 10, 2026 06:18
@mjbvz mjbvz enabled auto-merge March 10, 2026 06:18
@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@TylerLeonhardt

Matched files:

  • src/vs/platform/quickinput/test/browser/quickinput.test.ts

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the codebase-wide effort from #269213 by removing a few remaining as any type assertions in tests, replacing them with more precise mock shapes and stronger types.

Changes:

  • Update chat request parser tests to stub services without as any by supplying required service-brand and readonly fields.
  • Update CDP accessibility domain tests to use AXPropertyName directly, removing an as any cast.
  • Update quick input tests to stub ILayoutService without as any by including _serviceBrand.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/chat/test/common/requestParser/chatRequestParser.test.ts Makes service mocks type-correct (e.g., _serviceBrand, events/booleans) so instantiationService.stub(...) no longer needs as any.
src/vs/platform/webContentExtractor/test/electron-main/cdpAccessibilityDomain.test.ts Uses AXPropertyName for createAXProperty to avoid name as any.
src/vs/platform/quickinput/test/browser/quickinput.test.ts Removes as any from the ILayoutService stub by providing _serviceBrand.

@mjbvz mjbvz merged commit e9e3431 into microsoft:main Mar 10, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants