ask-unit-test-generation

<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>

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ask-unit-test-generation" with this command: npx skills add navanithans/agent-skill-kit/navanithans-agent-skill-kit-ask-unit-test-generation

<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)

describe('functionName', () => {
  it('should return X when Y', () => {
    expect(func(input)).toBe(expected);
  });
  
  it('should throw on invalid', () => {
    expect(() => func(null)).toThrow(TypeError);
  });
});

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

ask-shadcn-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-nextjs-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-commit-assistance

No summary provided by upstream source.

Repository SourceNeeds Review