본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

mock-best-practices

테스트에서 외부 의존성을 대신하는 모의 객체의 사용을 점검하고 과도한 대체와 정리 누락을 수정합니다. CI가 관련 문제를 지속적으로 감지하는지도 확인합니다.

원문원문 설명 보기

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

AI 평가90점/ 100설치 방법 보기

이럴 때 유용합니다

  • 모의 객체가 너무 많은 테스트 검토
  • 테스트 사이의 정리 작업 확인
  • 실제 동작에 가까운 API 모의 구현 개선
  • CI 자동 검사 체계 검토

한국어 소개

할 수 있는 일

테스트에서 API나 데이터베이스 등을 대신하는 모의 객체를 점검하고, 실제 동작에 가까운 테스트로 개선하도록 돕습니다. 업무 로직까지 대체했는지, 불필요한 모의 객체가 있는지, 테스트 후 정리가 빠졌는지 확인합니다. 내부 처리 순서보다 동작과 출력을 검증하는 방향으로 수정을 제안합니다.

이럴 때 유용합니다

테스트는 통과하지만 운영 환경에서 문제가 생기거나, 모의 객체가 늘어나 테스트의 신뢰성을 판단하기 어려울 때 유용합니다. 테스트 파일과 CI 자동 검사를 함께 검토합니다. 규칙 위반을 감지하지 못하는 부분이나 검사에 실패해도 문제의 재발을 막지 못하는 부분을 지적합니다. 무엇을 모의 객체로 대체해야 하는지와 그 판단 근거도 설명합니다.

사용 예시

  • “이 테스트에서 불필요한 모의 객체와 정리 누락을 찾아 주세요.”
  • “MSW로 API 모의 구현을 실제 동작에 가깝게 개선해 주세요.”
  • “CI에서 모의 객체 관련 문제를 지속적으로 검사할 수 있는지 검토해 주세요.”

주의 사항

자료에는 Jest의 afterEach에서 jest.restoreAllMocks()를 사용하는 예시와 API 모의 구현에 MSW를 사용하는 방침이 제시되어 있습니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

객관 평가

AI가 SKILL.md의 내용만을 근거로 4가지 관점에서 판정했습니다. 스타 수나 인기도는 판정에 넣지 않았습니다.

지시의 명확성언제 쓰고 무엇을 하는지 알 수 있는가
A양호테스트와 CI에서 과도한 모의 객체 사용과 정리 누락을 점검한다고 명시합니다.
절차의 구체성절차·입출력·예시가 구체적으로 적혀 있는가
A양호불필요한 모의 객체 제거, afterEach 복원, CI 검사 누락 지적을 구체적으로 제시합니다.
안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호테스트와 CI 검토가 중심이며 파일 삭제나 외부 전송을 실행하라는 지시는 없습니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족Jest와 MSW를 언급하지만 설치 및 설정 절차는 제시하지 않습니다.

총점은 각 항목을 A=25점, B=15점, C=5점으로 더한 값입니다. 2026년 10월 23일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

포함된 파일(2)

  • SKILL.md1.7 KB
  • references/rule.md3.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Follow mocking best practices

Proper mocking isolates units under test while keeping tests realistic—over-mocking creates false confidence when tests pass but production breaks.

Quick Reference

  • Mock external dependencies (APIs, databases, file system), not business logic
  • Always clean up mocks with jest.restoreAllMocks() in afterEach
  • Use MSW for realistic API mocking without coupling to implementation
  • Test behavior and outputs, not internal implementation details

Check

Review this test file for mocking patterns, checking for over-mocking, missing mock cleanup, and proper mock implementation.

Fix

Improve mocking strategy by removing unnecessary mocks, adding proper cleanup, and mocking at the right level of abstraction.

Explain

Explain mocking best practices including when to mock, what to mock, and common mocking pitfalls.

Code Review

Review tests, CI workflows, and enforcement points related to Follow mocking best practices. 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/mock-best-practices

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

404-page

무료

Create and review custom 404 pages that help visitors recover from broken or moved links through search and navigation. Check the rendered page and HTTP response so missing content returns a proper 404 status.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating a helpful custom 404 page
  • Adding search and navigation for broken links
  • Checking missing pages that return HTTP 200
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

Audit or create a dedicated About page that explains a website’s purpose and identifies its people or organization. Review the rendered output and supporting information, including expertise and contact details, to find gaps.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a website’s About page
  • Creating a page about the organization and its mission
  • Checking how operator information appears in rendered output
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

accessibility-testing

무료요약 있음AI 평가 80점

페이지와 공통 컴포넌트에 자동 접근성 테스트를 추가하고 검사 누락을 찾습니다. 지속적 통합에 검사를 연결해 구조·속성 문제와 변경으로 생긴 오류를 확인합니다.

  • 공통 컴포넌트의 테스트 범위 검토
  • 페이지 조작 테스트에 접근성 검사 추가
  • 지속적 통합에서 접근성 검사 실행
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

accessible-authentication

무료요약 있음AI 평가 90점

로그인부터 다단계 인증과 계정 복구까지 점검하고, 붙여넣기 차단이나 인증 코드 수동 입력처럼 이용을 방해하는 인증 절차의 개선을 돕습니다.

  • 전체 로그인 과정의 접근성을 점검합니다
  • 인증 코드 붙여넣기와 자동 완성을 확인합니다
  • 비밀번호 재설정과 계정 복구를 점검합니다
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

Review form errors, success messages, and live updates so screen reader users receive important notifications. Check the HTML delivered to the browser, announcement settings, display duration, and dismissal controls, then identify specific elements that need changes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing form error announcements
  • Checking success message display duration
  • Auditing live update notifications
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

Review HTML tables so screen reader users can understand how headers and data relate. Check header markup, table descriptions, and merged cells, then identify specific fixes and ways to verify them.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing tables for screen reader accessibility
  • Checking header relationships in tables with merged cells
  • Reviewing table patterns in a design system
thedaviddias/Front-End-Checklist7.5만2026년 10월 6일 업데이트

thedaviddias의 스킬 모두 보기

이 스킬의 문제 신고