go-testing

Generate table-driven Go test suites with coverage and Bubbletea state validation.

2|Updated Jul 29, 2025
One-click install
npx skills add https://github.com/kurojs/EnderDots --skill go-testing-kurojs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-testing
Source: https://github.com/kurojs/EnderDots/tree/main/.config/opencode/skills/go-testing
Command: npx skills add https://github.com/kurojs/EnderDots --skill go-testing-kurojs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you structure Go tests so they reliably verify behavior, measure coverage, and validate interactive Bubbletea/TUI flows and golden outputs without flaky assertions.

Core Features & Use Cases

  • Table-driven unit testing for deterministic behavior across multiple scenarios (e.g., input/expected output).
  • Bubbletea testing patterns by testing Model.Update() state transitions directly, with teatest reserved for truly interactive flows.
  • Coverage + golden file verification to lock in rendered output deterministically and update it safely via the -update path.
  • Safe filesystem and integration boundaries using t.TempDir() and skipping slow/external-command tests with testing.Short().

Quick Start

Trigger go-testing by asking for focused Go test cases that include table-driven scenarios, deterministic golden assertions, and Bubbletea state transition coverage for the relevant package code.

Frequently Asked Questions about go-testing

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

FAQPage Schema
How do I test Bubbletea TUI state transitions in Go without flaky assertions?

Test Bubbletea state transitions in Go by directly calling Model.Update() with tea.Msg and verifying the resulting state, reserving teatest for truly interactive flows to avoid flaky assertions.

What is the best way to structure Go table-driven tests for multiple scenarios?

The best way to structure Go table-driven tests is using named subtests that iterate over input and expected output scenarios, ensuring deterministic behavior verification across multiple cases.

How do I update golden files in Go tests without breaking deterministic checks?

Update golden files in Go tests safely through an explicit -update mechanism, locking in rendered output deterministically while keeping golden assertions intact during normal test runs.

Can I use t.TempDir for filesystem-dependent Go tests that run external commands?

Yes, you can use t.TempDir for filesystem-dependent Go tests to create safe isolation boundaries, and skip slow integration tests running external commands by checking testing.Short().

How do I measure test coverage for Go packages with pure logic and TUI flows?

Measure test coverage for Go packages by building test suites that cover both pure logic and Bubbletea TUI behavior, combining table-driven unit tests with deterministic golden-render verification.