원클릭으로
test-add
Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run performance benchmarks measuring function execution time and analysis pipeline throughput.
Refactor recently written or changed code for quality and efficiency. Use after writing or editing code to clean it up.
Run unit tests for the project. Use when the user asks to test, verify, or check code correctness.
| name | test-add |
| description | Add unit tests for a specific source file or function. Use when the user asks to add tests, write tests, or improve test coverage. |
| argument-hint | <source-file-path> |
| disable-model-invocation | true |
| allowed-tools | Read, Glob, Grep, Bash(npx tsc *), Bash(npx mocha *) |
Generate unit tests for a source file in this project.
Read the source file at $ARGUMENTS to understand its exports and logic.
Determine which functions are pure (no VSCode API dependency) and testable without mocking.
vscode.Range, vscode.Diagnostic, vscode.TextDocument, etc.Determine the test file path:
src/<module>/<file>.ts → Test: src/test/<module>/<file>.test.tsWrite tests following these conventions:
suite() and test() (NOT describe/it)assert from "assert"Verify:
npx tsc -p . --outDir out
npx mocha --ui tdd --require out/test/vscode-mock.js "out/test/<module>/**/*.test.js"
src/test/
├── vscode-mock.ts # VSCode API mock (loaded via --require)
├── parser/ # Tests for src/parser/
├── analyzer/ # Tests for src/analyzer/
├── codeActions/ # Tests for src/codeActions/
├── rules/ # Tests for src/rules/
├── benchmark/ # Performance benchmarks
└── fixtures/ # Test data