plugins/aks-desktop: Migrate Jest tests to Vitest#135
Merged
Conversation
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Contributor
There was a problem hiding this comment.
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.jsonand 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.
sniok
approved these changes
Jan 27, 2026
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.
These changes migrate the Jest tests to Vitest, allowing us to consolidate all the tests under 1 test runner.
Fixes: #134
Testing
cd plugins/aks-desktop && npm run test