← スキル一覧

This skill enables Claude to generate high-quality, comprehensive frontend tests for the Dify project following established conventions and best practices. > **⚠️ Authoritative Source**: This skill is derived from `web/docs/test.md`. Use Vitest mock/timer APIs (`vi.*`). ## When to Apply This Skill Apply this skill when the user: - Asks to **write tests** for a component, hook, or utility - Asks to **review existing tests** for completeness - Mentions **Vitest**, **React Testing Library**, **RTL**, or **spec files** - Requests **test coverage** improvement - Uses `pnpm analyze-component` output as context - Mentions **testing**, **unit tests**, or **integration tests** for frontend code - Wants to understand **testing patterns** in the Dify codebase **Do NOT apply** when: - User is asking about backend/API tests (Python/pytest) - User is asking about E2E tests (Playwright/Cypress) - User is only asking conceptual questions without code context ## Quick Reference ### Tech Stack | Tool | Version | Purpose | |------|---------|---------| | Vitest | 4.0.16 | Test runner | | React Testing Library | 16.0 | Component testing | | jsdom | - | Test environment | | nock | 14.0 | HTTP mocking | | TypeScript | 5.x | Type safety | ### Key Commands ```bash # Run all tests pnpm test # Watch mode pnpm test:watch # Run specific file pnpm test path/to/file.spec.tsx # Generate coverage report pnpm test:coverage # Analyze component complexity pnpm analyze-component # Review existing test pnpm analyze-component --review ``` ### File Naming - Test files: `ComponentName.spec.tsx` (same directory as component) - Integration tests: `web/__tests__/` directory ## Test Structure Template ```typescript import { render, screen, fireEvent, waitFor } from '@testing-library/react'

Philosophy

クリエイターであり、顧客でもある

Skillora では、スキルを売る人も買う人も同じコミュニティにいます。 気に入った作者の新作やアップデートを追いかけたり、自分も出品して還元を受け取ったり。 好きなクリエイターをフォローして、発見と応援をひとつの場所で。

インストール

購入後にターミナルで実行してください。

更新情報

最終更新: 2026-03-31

正規購入者にはインストールコマンド再実行で最新版が配信されます。

継続的な価値を提供します

Skilloraのスキルはライセンス認証で保護されており、定期的にアップデートされます。スクリーンショットやコピーでは最新版を受け取れず、バグ修正や新機能の恩恵も得られません。正規購入者には常に最新バージョンが自動配信されます。

利用規約を確認 →

評価とレビュー

評価なし

まだレビューがありません。最初のレビューを書いてみましょう。

分類
⚡ ワークフロー
安全性
評価
DL
最終更新
2026-03-31
対応エージェント
Claude Code

共有する

SNS・リンクで広める

Frontend Testing — AIの使い方が変わるスキル

Vitest + RTL tests for frontend components/hooks. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests.

https://skillora.jp/skills/frontend-testing

この作者の他のスキル

このスキルに似たスキル