Skip to content

plugins/aks-desktop: Migrate Jest tests to Vitest#135

Merged
sniok merged 1 commit into
Azure:mainfrom
skoeva:vitest
Jan 27, 2026
Merged

plugins/aks-desktop: Migrate Jest tests to Vitest#135
sniok merged 1 commit into
Azure:mainfrom
skoeva:vitest

Conversation

@skoeva
Copy link
Copy Markdown
Collaborator

@skoeva skoeva commented Jan 16, 2026

These changes migrate the Jest tests to Vitest, allowing us to consolidate all the tests under 1 test runner.

Fixes: #134

Testing

  • Run cd plugins/aks-desktop && npm run test

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
@skoeva skoeva self-assigned this Jan 16, 2026
Copilot AI review requested due to automatic review settings January 16, 2026 13:54
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 migrates the AKS Desktop plugin's test suite from Jest to Vitest, consolidating all tests under a single test runner provided by the @kinvolk/headlamp-plugin package. The migration removes Jest-specific configuration files, test setup files, mock implementations, and documentation, while updating the existing test files to use Vitest's API.

Changes:

  • Removed all Jest configuration files, Babel configs, and setup files from the test-config/ directory
  • Updated test files to use Vitest imports (vi, describe, test, expect) instead of Jest
  • Removed Jest-specific dependencies from package.json and consolidated test commands
  • Updated test documentation to reflect Vitest usage and simplified test running instructions

Reviewed changes

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

Show a summary per file
File Description
plugins/aks-desktop/test-config/**/* Removed entire Jest configuration directory including setup files, Babel configs, and Jest-specific configurations
plugins/aks-desktop/src/utils/test/run-tests.js Removed custom test runner script that was used for flexible Jest execution
plugins/aks-desktop/src/utils/test/az-cli-simple.test.ts Updated to use Vitest imports and vi mocking API instead of Jest
plugins/aks-desktop/src/utils/test/az-cli-final.test.ts Updated to use Vitest imports, removed manual test runner code, simplified to Vitest-only implementation
plugins/aks-desktop/src/utils/test/__mocks__/*.js Removed Jest mock files that are no longer needed
plugins/aks-desktop/src/utils/test/README.md Significantly simplified to focus on Vitest usage, removing extensive Jest documentation
plugins/aks-desktop/src/types/jest-dom.d.ts Removed Jest-specific type definitions
plugins/aks-desktop/src/setupTests.ts Removed Jest setup file with browser mocks and test environment configuration
plugins/aks-desktop/package.json Removed Jest-related npm scripts and dependencies, kept only headlamp-plugin test command

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

@skoeva skoeva requested review from Tatsinnit and sniok January 22, 2026 15:00
Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

@sniok sniok merged commit 4c88c99 into Azure:main Jan 27, 2026
13 checks passed
@skoeva skoeva deleted the vitest branch February 23, 2026 16:29
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.

Migrate jest tests to vitest

4 participants