test-helper

Generate unit and integration tests for Go and TypeScript/JavaScript projects.

12|Updated Jun 16, 2025
One-click install
npx skills add https://github.com/kcaldas/genie --skill test-helper-kcaldas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-helper
Source: https://github.com/kcaldas/genie/tree/main/pkg/skills/internal/skills/test-helper
Command: npx skills add https://github.com/kcaldas/genie --skill test-helper-kcaldas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing comprehensive and maintainable tests, ensuring code quality and reducing the burden of test creation and upkeep.

Core Features & Use Cases

  • Test Generation: Writes unit, integration, and end-to-end tests following best practices.
  • Mocking & Fixtures: Helps set up mocks for dependencies and test fixtures.
  • Coverage Guidance: Ensures tests cover essential scenarios, edge cases, and error paths.
  • Use Case: You need to write unit tests for a new Go function and ensure it handles various inputs and potential errors correctly, following the project's established testing patterns.

Quick Start

Write a table-driven test for the CalculateTotal function in Go.

Frequently Asked Questions about test-helper

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests in Go following best practices?

Unit tests in Go should use table-driven patterns with clear input-output pairs, descriptive test names, and the Arrange-Act-Assert structure. This approach isolates functionality, improves readability, and makes it easy to add new test cases by extending the table.

What's the best way to structure integration tests in TypeScript?

Integration tests in TypeScript combine multiple components using mocks for external dependencies and fixtures for shared test data. Organize them with descriptive names, realistic scenarios, and fast isolated execution to verify system behavior without external services.

How do I set up mocks and test fixtures for my tests?

Mocks replace external dependencies like APIs or databases, while fixtures provide pre-configured test data. Together they enable fast, isolated test execution. Jest supports both through spies and factories, letting you control behavior and verify interactions without hitting real services.

Can I write tests that cover edge cases and error paths?

Yes. Comprehensive test coverage includes happy paths, edge cases, boundary conditions, and error scenarios. Table-driven tests make this systematic: add rows for null inputs, empty arrays, negative numbers, and expected exceptions to ensure your code handles all situations correctly.

Does this work with both Go and TypeScript projects?

Yes. This Skill covers unit, integration, and end-to-end tests across Go and TypeScript/JavaScript, adapting patterns like table-driven tests and Arrange-Act-Assert to each language's idioms and testing frameworks like Jest.