Test generator

From Tibsfox/gsd-skill-creator · View interactive version

Test generator is an AI agent skill from the GitHub repository Tibsfox/gsd-skill-creator. Generates test cases for functions and components. Use when writing tests or creating test suites.

How to use this skill

Skill file

Test Generation

Structure (AAA Pattern)

it('should [expected] when [condition]', () => {
  // Arrange — set up data
  // Act — perform operation
  // Assert — verify outcome
});

Test Categories

| Category | Test For |

|----------|----------|

| Happy path | Valid input → expected output |

| Edge cases | Empty, null, boundary values |

| Error cases | Invalid input, failures |

| Side effects | State changes, calls made |

| Async | Resolve/reject paths |

Naming

Pattern: should [behavior] when [condition]

Organization

Anti-Patterns

| Don't | Do |

|-------|------|

| Test implementation | Test behavior |

| Share mutable state | Reset in beforeEach |

| Many assertions per test | One concept per test |

| Test private methods | Test through public API |

| Snapshot overuse | Assert specific values |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.