Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Migrated the testing framework from Jest to Vitest. This involves replacing the dependencies, creating a new configuration file for Vitest, updating the TypeScript configuration to recognize Vitest globals, and refactoring the test files to use vi instead of jest for mocking and spying. The test script in package.json was also updated to run vitest.


PR created automatically by Jules for task 10559607753500242316 started by @bmesuere

- Replaced `jest`, `ts-jest` and `@types/jest` with `vitest`
- Created `vitest.config.ts`
- Updated `tsconfig.json` to include vitest globals
- Updated all test files to use `vi` instead of `jest`
- Updated `package.json` test script
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@bmesuere bmesuere marked this pull request as ready for review January 1, 2026 21:00
Copilot AI review requested due to automatic review settings January 1, 2026 21:00
@bmesuere bmesuere merged commit 8ef23e2 into main Jan 1, 2026
6 checks passed
@bmesuere bmesuere deleted the chore-migrate-to-vitest-10559607753500242316 branch January 1, 2026 21:01
Copy link

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 successfully migrates the testing framework from Jest to Vitest. The migration includes removing Jest-related dependencies, adding Vitest as a new dev dependency, creating a Vitest configuration file, updating TypeScript configuration to recognize Vitest globals, and refactoring all test files to use vi instead of jest for mocking and spying.

Key Changes:

  • Replaced Jest dependencies (@types/jest, jest, ts-jest) with Vitest
  • Created vitest.config.ts with equivalent configuration settings
  • Updated all test files to use vi instead of jest for mocking
  • Updated test script to run vitest run instead of Jest with experimental VM modules

Reviewed changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Removed Jest dependencies, added Vitest, updated test script
vitest.config.ts New Vitest configuration with globals, node environment, and v8 coverage
tsconfig.json Added Vitest globals type definitions
jest.config.ts Removed Jest configuration file
yarn.lock Updated lockfile with Vitest dependencies and removed Jest-related packages
tests/mocks/mockFetch.ts Changed from jest.fn to vi.fn
tests/commands/*.test.ts Updated all test files to import and use vi instead of jest

The migration appears to be complete and consistent across all files. No issues were identified with the changes.


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

let error: string[];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const writeSpy = jest
const writeSpy = vi
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

Unused variable writeSpy.

Copilot uses AI. Check for mistakes.
let error: string[];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const writeSpy = jest
const writeSpy = vi
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

Unused variable writeSpy.

Copilot uses AI. Check for mistakes.
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.

1 participant