本文へスキップ
Skillpedia
テスト75k · #3051

test-coverage

できること

このスキルは、ソフトウェアプロジェクトにテストカバレッジの上限と下限を設定します。時間が経ってもコードが十分にテストされていてほしい開発者やチームリーダー向けです。

使う場面

  • ✓プロジェクトに最低限のテストカバレッジのルールがないとき。
  • ✓カバレッジの設定はあるが、ビルド中に確認されていないとき。
  • ✓カバレッジが基準を下回ったら、ビルドを失敗させたいとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/test-coverage/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/test-coverage/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“プロジェクトにはテストがありますが、カバレッジが下がっても止める仕組みがありません。ビルドを止める最低基準を設定してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、テストツールに最低カバレッジの数値を設定し、ビルドに確認を追加します。カバレッジが下限を下回ると、ビルドは失敗します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Maintain test coverage thresholds

Coverage thresholds prevent code quality from degrading over time by failing builds when test coverage drops below safe levels.

Quick Reference

  • Set global thresholds: 70% branches, 80% lines/functions/statements
  • Apply stricter thresholds (90%+) to critical utility code
  • Exclude generated code, type definitions, and config files
  • Focus on meaningful coverage—test behavior, not just lines

Check

Review this project's test coverage configuration to ensure minimum thresholds are set and enforced in CI/CD.

Fix

Configure coverage thresholds in Jest, Vitest, or your testing framework, and add coverage checks to CI/CD.

Explain

Explain how to set up test coverage thresholds and what coverage levels are appropriate for different types of code.

Code Review

Review tests, CI workflows, and enforcement points related to Maintain test coverage thresholds. Flag exact gaps where the rule is not automatically verified or where failures do not block regressions.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/testing/test-coverage

よくある質問

このスキルはどのカバレッジの水準を提案しますか?

分岐はおよそ70パーセント、行、関数、文は80パーセント程度を提案し、重要なコードにはより厳しい基準を勧めています。

どのツールで使えますか?

Jest、Vitest、その他のテストフレームワークで使えるとこのスキルは挙げています。

すべての行をテストすべきですか?

いいえ。このスキルは、数値を達成することではなく、振る舞いについての意味のあるテストに集中するよう勧めています。

詳細

作者による元の説明

Use when reviewing CI coverage, automated checks, or test strategy related to Maintain test coverage thresholds. Focus on whether the rule is continuously verified, not just documented.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3051
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル