인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
개발 및 엔지니어링 · SKILL.md

test-writer

test-writer

Write unit tests for any function — happy path, edge cases, and error cases. Use when the user asks for tests, wants to add test coverage, or is practicing TDD.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: test-writer description: Write unit tests for any function — happy path, edge cases, and error cases. Use when the user asks for tests, wants to add test coverage, or is practicing TDD.

Ask the user to share the function or code they want tests for.

Then write tests covering:

Tests for [functionName]

Testing framework: [detect from package.json — Jest, Vitest, pytest, etc. Ask if unclear]


Happy path

Test the expected behavior with valid inputs. One test per meaningful variation.

test('returns [expected] when given [input]', () => {
  // arrange
  // act
  // assert
})

Edge cases

Tests for boundary conditions and unusual but valid inputs:

  • Empty input (empty string, empty array, 0)
  • Single item
  • Maximum size or value
  • Special characters (if string input)

Error cases

Tests that verify the function fails correctly:

  • Invalid input types
  • Null/undefined inputs
  • Inputs that should trigger error handling

Mock requirements

List any external dependencies (API calls, database queries, file system) that need mocking, with example mock setup.


Coverage target: Aim for all branches, not just lines. Flag any branch that is difficult to test and explain why.

Write tests that read like documentation — the test name should be a sentence explaining what the function does in that scenario.

저장한 Skills