본문으로 건너뛰기
Skillpedia
테스트75k · #3070

unit-tests

하는 일

이 스킬은 가장 중요한 로직부터 시작해 코드베이스에 집중된 단위 테스트를 추가합니다. 코드를 바꿀 때 더 큰 확신을 원하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓중요한 함수나 컴포넌트에 단위 테스트가 없는 프로젝트가 있을 때.
  • ✓위험한 코드를 리팩터링하기 전에 테스트를 먼저 갖추고 싶을 때.
  • ✓팀이 CI에서 실행되며 회귀를 잡아 줄 테스트를 원할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

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.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“결제 금액 계산에 테스트가 없어서 수정하기가 두렵습니다. 핵심 로직에 대한 단위 테스트를 작성해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 테스트되지 않은 함수를 찾고, 기대 동작을 설명하는 집중된 테스트를 작성합니다. 내부 모듈이 아니라 외부 서비스를 모의(mock) 처리해, 테스트가 안정적으로 유지되도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

테스트 커버리지는 얼마나 되어야 충분한가요?

스킬은 모든 줄을 똑같이 취급하기보다, 핵심 경로에서 80퍼센트 이상을 목표로 합니다.

테스트는 자동으로 실행해야 하나요?

네. 스킬은 회귀를 일찍 잡을 수 있도록 CI에서 실행할 것을 권장합니다.

좋은 테스트 이름이란 무엇인가요?

확인하는 동작을 설명하는 구체적인 이름입니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
75k
순위
#3070
라이선스
MIT
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬