Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Nov 17, 2025

Part of COMPASS-9897

@Anemy Anemy requested a review from a team as a code owner November 17, 2025 03:43
@Anemy Anemy requested review from Copilot and lerouxb November 17, 2025 03:43
Copy link
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 enables TypeScript type checking for test files in the compass-connections package by removing type errors and adding proper type annotations throughout the test suite.

Key changes:

  • Added type annotations to test variables and functions to satisfy TypeScript strict mode
  • Added missing userConnectionString field to mock connection objects to match the ConnectionInfo interface
  • Removed unused dependencies and functions that are no longer needed

Reviewed Changes

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

Show a summary per file
File Description
packages/compass-connections/src/utils/telemetry.spec.tsx Added ErrorWithCause type and replaced any types with proper type annotations for error objects
packages/compass-connections/src/utils/connection-supports.spec.ts Added type annotation to mockConnections array and added missing userConnectionString field to all mock objects
packages/compass-connections/src/stores/connections-store-redux.spec.tsx Added type annotations to variables and added null checks before using potentially undefined values
packages/compass-connections/src/hooks/use-connections-with-status.spec.tsx Added parameter type annotation to getConnectionById function
packages/compass-connections/src/hooks/use-connection-supports.spec.ts Added missing userConnectionString field to all mock connection objects
packages/compass-connections/src/connection-scoped-app-registry.ts Changed any[] to unknown[] for better type safety in emit method signatures
packages/compass-connections/src/components/connection-status-notifications.tsx Removed unused isCancelError import and getConnectionErrorMessage function
packages/compass-connections/package.json Updated typecheck script to check all TypeScript files and removed unused @mongodb-js/compass-utils dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Anemy Anemy added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Nov 17, 2025
@Anemy Anemy merged commit edc8751 into main Nov 17, 2025
62 of 63 checks passed
@Anemy Anemy deleted the typecheck-compass-connections-tests branch November 17, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants