Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Unit Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-unit-testing)
---
name: unit-testing
description: Write fast, isolated, behaviour-focused unit tests with clear arrange/act/assert structure.
tags: [testing]
---
# Unit Testing
## When to use
- Pure logic, domain rules, utilities
## Procedure
1. Name tests by behaviour
2. Arrange minimal data with builders
3. Act once
4. Assert on outputs and observable effects
5. Cover edge cases and errors
## Checklist
- [ ] Tests run in milliseconds
- [ ] No shared mutable state
## Anti-patterns
- Testing private methods
- Snapshot tests for logic