nextjs-vitest

Set up Vitest testing environment for a Next.js project.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "nextjs-vitest" with this command: npx skills add tenkoh/skills/tenkoh-skills-nextjs-vitest

Set up Vitest testing environment for a Next.js project.

Steps

  1. Install required packages

Run the following command:

npm install -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom vite-tsconfig-paths @testing-library/jest-dom @testing-library/user-event

  1. Create vitest.config.mts

Create vitest.config.mts in the project root:

import react from "@vitejs/plugin-react"; import tsconfigPaths from "vite-tsconfig-paths"; import { defineConfig } from "vitest/config";

export default defineConfig({ plugins: [tsconfigPaths(), react()], test: { environment: "jsdom", globals: true, clearMocks: true, setupFiles: ["./vitest.setup.ts"], }, });

  1. Create vitest.setup.ts

Create vitest.setup.ts in the project root:

import "@testing-library/jest-dom/vitest";

  1. Verify completion

Confirm all files have been created correctly.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

nano-banana-2

Nano Banana 2 - Gemini 3.1 Flash Image Preview

Repository Source
42.8K153inferen-sh
General

qwen-image-2

Qwen-Image - Alibaba Image Generation

Repository Source
42.6K153inferen-sh
General

p-video

Pruna P-Video Generation

Repository Source
42.6K153inferen-sh
General

qwen-image-2-pro

Qwen-Image Pro - Professional Image Generation

Repository Source
42.6K153inferen-sh