Generate unit tests for a source file. Analyzes the code and creates test cases covering public functions, edge cases, and error paths. Use when you need test coverage for new code or when tests are missing.
Generate unit tests for a given source file by analyzing its public interface, control flow, and error handling paths.
Writing tests from scratch is tedious and developers skip it. This skill generates a solid starting point that covers the obvious cases, so the developer can focus on the tricky edge cases that require domain knowledge.
Read the source file. Identify:
For each public function, generate test cases for:
Create the test file following project conventions:
Write the test file to the standard test location for the language.
Run the generated tests:
# Detect and run appropriate test commandIf any tests fail due to incorrect assumptions, fix them. Report which tests pass and which needed adjustment.
LuminairPrime/git-worktrees-prime
49d6ae2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.