Skip to content

chore(tests): migrate from jest to vitest - #70

Merged
r-farkhutdinov merged 2 commits into
mainfrom
r-farkhutdinov/vitest-migration
Oct 7, 2026
Merged

r-farkhutdinov merged 2 commits into
mainfrom
r-farkhutdinov/vitest-migration

Conversation

@r-farkhutdinov

Copy link
Copy Markdown
Contributor

Practical Value

Before

After

@r-farkhutdinov r-farkhutdinov self-assigned this Oct 7, 2026
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The root test command bypasses the newly added TypeScript test checks, allowing type-invalid tests to pass.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Migrates the repository’s TypeScript tests from Jest/ts-jest to Vitest.

Changes:

  • Adds shared Vitest configuration and imports.
  • Replaces Jest dependencies and scripts with Vitest.
  • Separates production and test TypeScript configurations.
File Description
vitest.config.mts Adds shared Vitest settings.
pnpm-workspace.yaml Catalogs Vitest instead of Jest.
pnpm-lock.yaml Updates resolved test dependencies.
package.json Replaces the root Jest command.
jest.config.js Removes obsolete Jest configuration.
packages/​common/​package.json Adds package-level Vitest execution.
packages/​common/​tsconfig.json Excludes tests from builds.
packages/​common/​tsconfig.test.json Adds test type-checking configuration.
packages/​common/​src/​path-utils.test.ts Imports Vitest APIs.
packages/​code-scanning/​package.json Migrates package test dependencies and command.
packages/​code-scanning/​tsconfig.json Removes Jest types.
packages/​code-scanning/​tsconfig.test.json Configures test module resolution.
packages/​code-scanning/​src/​validate-node-versions.test.ts Imports Vitest APIs.
packages/​code-scanning/​src/​validate-lock-files.test.ts Imports Vitest APIs.
packages/​code-scanning/​src/​pnpm-audit.test.ts Imports Vitest APIs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Outdated
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The migration consistently updates configuration, dependencies, scripts, type checking, and every existing test file.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@r-farkhutdinov
r-farkhutdinov merged commit 4972016 into main Oct 7, 2026
1 check passed
@r-farkhutdinov
r-farkhutdinov deleted the r-farkhutdinov/vitest-migration branch October 7, 2026 10:26
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