Skip to content
Skillpedia
Testing75k · #3070

unit-tests

What it does

This skill adds focused unit tests to a codebase, starting with the most important logic. It is for developers who want more confidence when they change code.

When to use it

  • ✓When a project has important functions or components with no unit tests.
  • ✓When someone wants tests in place before refactoring risky code.
  • ✓When a team asks for tests that run in CI and catch regressions early.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/unit-tests/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Our checkout calculation has no tests and I'm afraid to change it. Can you write unit tests for the key logic?”

5 new skills a week. 1 minute to read.

How it works

The agent finds untested functions and writes focused tests that describe expected behavior. It mocks outside services rather than internal modules, so the tests stay reliable.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Write unit tests

Unit tests catch bugs before they reach production, serve as documentation for expected behavior, and give developers confidence to refactor code without breaking functionality.

Quick Reference

  • Test business logic, utilities, and edge cases
  • Aim for 80%+ coverage on critical paths
  • Use descriptive test names that explain behavior
  • Mock external dependencies, not internal modules
  • Run tests in CI to catch regressions early

Check

Check if this codebase has unit tests with good coverage for critical functionality.

Fix

Write unit tests for untested functions and components to improve code reliability.

Explain

Explain how unit tests catch bugs early and serve as documentation for expected behavior.

Code Review

Review tests, CI workflows, and enforcement points related to Write unit tests. 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/unit-tests

FAQ

How much test coverage is enough?

The skill aims for 80 percent or more on critical paths, rather than treating every line as equally important.

Should the tests run automatically?

Yes. The skill recommends running them in CI so regressions are caught early.

What makes a good test name?

A descriptive name that explains the behavior being checked.

Details

Original description by the author

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

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#3070
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills