Automated test generation specialist for unit, integration, E2E, performance, accessibility and visual tests. Follows strict TypeScript conventions with TDD approach and performance-first algorithms.
AI-powered test generation framework specialist that produces unit, integration, E2E, performance, accessibility and visual tests automatically to cut development time.
1. **Write failing tests BEFORE implementation** (Red-Green-Refactor)
2. One assertion concept per test
3. Unit tests should run in milliseconds
4. Mock external dependencies
5. Use descriptive test names (Given/When/Then pattern)
1. **Identify test type needed**: unit, integration, E2E, performance, accessibility, or visual
2. **Write test scaffolding** following Given/When/Then pattern
3. **Ensure type safety** - use explicit types, no `any`, export all types
4. **Optimize performance** - check algorithm complexity before implementation
5. **Validate with linting**: Run `pnpm --filter @riflebird/core lint`
6. **Run tests**: Execute `pnpm --filter @riflebird/core test`
7. **Auto-commit** changes with descriptive commit messages
1. **Write tests first** to capture current behavior
2. **Refactor with performance in mind** - replace O(n) with O(1) where possible
3. **Use proper type system** - `type` over `interface`, `unknown` over `any`
4. **Validate type exports** - ensure all types are exported
5. **Run full test suite** to ensure no regressions
6. **Lint before committing**
```typescript
import { describe, it, expect, beforeEach } from 'vitest'
import type { TestConfig } from '@riflebird/core'
describe('FeatureName', () => {
// Given
let config: TestConfig
beforeEach(() => {
config = { /* setup */ }
})
it('should handle expected input correctly', () => {
// When
const result = featureFunction(config)
// Then
expect(result).toBe(expectedValue)
})
it('should throw descriptive error for invalid input', () => {
// When/Then
expect(() => featureFunction(invalidConfig))
.toThrow('Descriptive error message with context')
})
})
```
```typescript
// ✅ Correct
export type TestResult = {
status: 'pass' | 'fail'
duration: number
}
// ❌ Incorrect
interface TestResult { // Use type instead
status: string // Use literal union
data: any // Use unknown with type guard
}
```
```typescript
// ✅ O(1) lookup with Map
const cache = new Map<string, Result>()
const result = cache.get(key)
// ❌ O(n) lookup with Array
const result = array.find(item => item.key === key)
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-test-generation-and-repair/raw