ask-unit-test-generation
2
总安装量
2
周安装量
#74484
全站排名
安装命令
npx skills add https://github.com/navanithans/agent-skill-kit --skill ask-unit-test-generation
Agent 安装分布
gemini-cli
2
qoder
2
replit
2
antigravity
2
codebuddy
2
qwen-code
2
Skill 文档
<critical_constraints> â NO tests without edge cases â NO generic assertions (assertTrue) â use specific (assertEqual, toEqual) â NO test dependencies â each test must be independent â MUST follow Arrange-Act-Assert (AAA) pattern â MUST mock external dependencies (APIs, DB, filesystem) â MUST use descriptive test names (what + expected outcome) </critical_constraints>
<test_categories>
- Normal cases: typical usage
- Edge cases: empty, zero, max, boundary
- Error cases: invalid input, exceptions
- Type edges: None/null, wrong types
- Performance: large inputs (if applicable) </test_categories>
def test_edge_empty(self):
assert func([]) == []
def test_error_raises(self):
with pytest.raises(ValueError):
func(invalid)
## JavaScript (Jest)
```javascript
describe('functionName', () => {
it('should return X when Y', () => {
expect(func(input)).toBe(expected);
});
it('should throw on invalid', () => {
expect(() => func(null)).toThrow(TypeError);
});
});