Skip to content

Migrate jest to vitest - #153

Merged
Atis9 merged 1 commit into
mainfrom
feature/atis/vitest
Feb 10, 2026
Merged

Migrate jest to vitest#153
Atis9 merged 1 commit into
mainfrom
feature/atis/vitest

Conversation

@Atis9

@Atis9 Atis9 commented Feb 10, 2026

Copy link
Copy Markdown
Owner

関連 Issue

概要

詳細

関連資料

Copilot AI review requested due to automatic review settings February 10, 2026 04:53
@Atis9 Atis9 self-assigned this Feb 10, 2026
@vercel

vercel Bot commented Feb 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nyantech-com Ready Ready Preview, Comment Feb 10, 2026 4:54am

@Atis9 Atis9 added the enhancement New feature or request label Feb 10, 2026
@Atis9
Atis9 merged commit 8caad95 into main Feb 10, 2026
9 checks passed
@Atis9
Atis9 deleted the feature/atis/vitest branch February 10, 2026 04:55

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.

Pull request overview

This PR migrates the project’s unit/integration testing setup from Jest to Vitest to run React/Next.js tests on a Vite-powered runner.

Changes:

  • Add Vitest configuration and setup (jsdom env, Testing Library jest-dom matchers, Next.js component mocks).
  • Update existing test files/mocks from jest.* to vi.* and update npm scripts to run Vitest.
  • Remove Jest configuration and dependencies.

Reviewed changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vitest.setup.tsx Adds Vitest test setup (jest-dom matchers + mocks for next/image and next/link).
vitest.config.ts Introduces Vitest config (jsdom, setup file, coverage).
tsconfig.json Adds Vitest global types (currently in a way that can break other global types).
package.json Switches scripts to Vitest and replaces Jest-related devDependencies with Vitest/Vite deps.
next-env.d.ts Changes Next-generated route types import path (currently points to a dev-only output path).
lib/posts.test.ts Migrates module mocks from Jest to Vitest (vi.mock, vi.fn).
tests/posts-page.test.tsx Migrates mocks from Jest to Vitest.
tests/page.test.tsx Migrates mocks from Jest to Vitest.
jest.setup.tsx Removed Jest setup file.
jest.config.ts Removed Jest config file.

💡 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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants