Skip to main content

test-generator

Generates test cases for functions and components. Use when writing tests or creating test suites.

Informações da origem

Repositório
Tibsfox/gsd-skill-creator
Última atividade na origem
25 de abril de 2026 às 21:14
Idioma detectado do SKILL.md
inglês
Estrelas
70
Forks
10

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
test-generator
description
Generates test cases for functions and components. Use when writing tests or creating test suites.
version
1.0.0
format
2025-10-02T00:00:00.000Z
triggers
["writing tests or creating test suites"]
updated
2026-04-25T00:00:00.000Z
status
ACTIVE
# Test Generation ## Structure (AAA Pattern) ```typescript 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 - Group with `describe` by function/method - Reset state in `beforeEach` - One concept per test ## 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 |
Ver no GitHub