Skip to content

fix: add missing getSubscriptions mock in ImportAKSProjects test#522

Open
gambtho wants to merge 1 commit intomainfrom
thgmable/mainfix
Open

fix: add missing getSubscriptions mock in ImportAKSProjects test#522
gambtho wants to merge 1 commit intomainfrom
thgmable/mainfix

Conversation

@gambtho
Copy link
Copy Markdown
Collaborator

@gambtho gambtho commented Mar 25, 2026

Description

Commit a5ad940 added getSubscriptions to the component's imports
but did not update the vi.mock for ../../utils/azure/aks, causing
vitest to throw "No getSubscriptions export is defined on the mock".

Copilot AI review requested due to automatic review settings March 25, 2026 19:41
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 fixes a Vitest failure in the AKS Desktop ImportAKSProjects test suite by updating the ../../utils/azure/aks module mock to include the newly imported getSubscriptions export.

Changes:

  • Add a mockGetSubscriptions function and expose it via the vi.mock('../../utils/azure/aks', ...) factory.
  • Reset and re-seed the getSubscriptions mock return value in beforeEach to keep tests isolated.

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

sniok
sniok previously approved these changes Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 22:27
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

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


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

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