generate-tests
FeaturedGenerate comprehensive tests for specified code
AI & Automation 5,772 stars
755 forks Updated today CC-BY-SA-4.0
Install
Quality Score: 92/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Generate Tests
Generate comprehensive tests for specified code.
## Instructions
1. Read the target file(s)
2. Identify testable units (functions, classes, methods)
3. Generate tests following project conventions
4. Ensure high coverage of edge cases
## Test Generation Process
### 1. Analyze Target
- Identify public interfaces
- Understand dependencies
- Note edge cases and boundaries
### 2. Detect Test Framework
Check for:
- `jest.config.js` → Jest
- `vitest.config.ts` → Vitest
- `pytest.ini` → pytest
- `mocha` in package.json → Mocha
### 3. Generate Tests
Follow the detected framework conventions.
## Test Categories
### Happy Path
Normal expected behavior with valid input.
### Edge Cases
- Empty inputs
- Null/undefined values
- Boundary values (0, -1, MAX_INT)
- Single item vs multiple items
### Error Cases
- Invalid input types
- Missing required parameters
- Network/IO failures
- Timeout scenarios
### Integration Points
- Database interactions
- External API calls
- File system operations
## Output Format
```typescript
describe('[ComponentName]', () => {
describe('[methodName]', () => {
// Happy path
it('should [expected behavior] when [condition]', () => {
// Arrange
// Act
// Assert
});
// Edge cases
it('should handle empty input', () => {});
it('should handle null values', () => {});
// Error cases
it('should throw when [invalid condition]', () => {});
});
});
```
## Conventions
- One assertion pe...
Details
- Author
- FlorianBruniaux
- Repository
- FlorianBruniaux/claude-code-ultimate-guide
- Created
- 7 months ago
- Last Updated
- today
- Language
- Python
- License
- CC-BY-SA-4.0
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
test-gen
Use when unit or integration tests need to be written for a specific file or module.
1 Updated 1 weeks ago
MrCipherSmith Testing & QA Solid
generate-tests
Use when the user asks to generate, create, or write unit tests for code. Analyzes the target code, produces a structured test case list for review, then generates test code. Supports Java (JUnit 5, Mockito, AssertJ).
49 Updated yesterday
mavka-ai Web & Frontend Listed
test-gen
Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns
1 Updated 2 days ago
allysgrandiose674