Communitygithub.com

ComeOnOliver/skillshub

Next.js App Router 프로젝트에서 유닛(Unit), 통합(Integration), E2E 테스트를 작성할 때 사용하는 테스트 표준입니다. (트리거: **/*.test.{ts, tsx}, cypress/**, tests/**, vitest, playwright, msw, testing-library)

skillshub란 무엇인가요?

이 스킬은 Next.js App Router 프로젝트에 특화된 유닛, 통합, E2E 테스트 표준을 제공합니다. Vitest, React Testing Library, Playwright, Mock Service Worker(MSW) 등 최신 테스팅 도구 스택을 사용하여 안정적이고 일관된 테스트 파이프라인을 구축하도록 돕습니다. 주요 구현 지침으로 AAA 패턴 기반 유닛 테스트, 사용자 흐름 중심의 Playwright E2E 테스트, MSW를 통한 네트워크 모킹, React Server Components(RSC) 테스트 전략을 제시합니다. 또한 접근성을 고려한 getByRole 선택자 사용, userEvent를 통한 비동기 상호작용, 80% 이상의 코드 커버리지 목표 등 실무에 바로 적용 가능한 모범 사례와 함께 Antipatterns을 통해 흔한 실수를 방지합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/HoangNguyen0403/agent-skills-standard/nextjs-testing

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Next.js 테스팅

우선순위: P1 (높음)

구조

tests/
├── unit/               # Vitest + RTL
├── e2e/                # Playwright
└── mocks/              # MSW 핸들러

구현 가이드라인

  • 유닛 테스트: 속도를 위해 Vitest를, 컴포넌트 동작 테스트를 위해 **React Testing Library (RTL)**를 사용하세요. Arrange-Act-Assert (AAA) 패턴을 따르세요.
  • E2E 테스트: 풀스택 App Router 검증을 위해 Playwright를 사용하세요. 사용자 흐름 (예: 로그인, 체크아웃)에 집중하세요.
  • 네트워킹: **Mock Service Worker (MSW)**를 사용하여 모든 내부/외부 API 경계를 모킹하세요. server 및 browser 핸들러가 올바르게 구성되었는지 확인하세요.
  • RSC 테스트: **React Server Components (RSC)**를 일반 라이브러리와 동일한 패턴으로 테스트하세요 (SSR 호환 테스트). 복잡한 비동기 데이터 로딩 로직에는 E2E 테스트를 선호하세요.
  • 상호작용: **userEvent (비동기)**를 사용하여 사용자 동작을 시뮬레이션하세요: await user.click(button).
  • 선택자: 접근성 테스트를 위해 getByRole / **findByRole**를 우선 사용하세요. **data-testid**는 대체 수단으로만 사용하세요.
  • 환경: 컴포넌트 테스트를 위해 **vitest.config.ts**에서 jsdom 또는 **happy-dom**을 설정하세요.
  • 리포팅: 테스트가 CI 게이트를 위해 JSON 커버리지 보고서를 생성하도록 하세요. 핵심 라이브러리에 대해 80% 이상의 커버리지를 목표로 하세요.

안티패턴

  • 테스트에서 실제 네트워크 사용 금지: 항상 MSW 핸들러 또는 모의 객체를 사용하세요.
  • 구현 테스트 금지: 내부 메서드가 아닌 사용자 동작을 테스트하세요.
  • 유닛 로직에 무거운 E2E 사용 금지: 격리된 로직 테스트에는 Vitest를 사용하세요.
  • 전역 상태 누수 금지: 각 테스트 후 MSW 핸들러와 모의 객체를 초기화하세요.

참고자료

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬