unit-test
SolidUse when the user asks for unit tests (e.g, "单元测试", "unit test"), wants to add/fix Go tests, wants table-driven and subtest organization, or wants to enforce a minimum coverage gate (default 80% for logic packages). Prioritize bug discovery (especially boundary, mapping loss, and concurrency defects) over test volume. Do NOT use for benchmarks, fuzz tests, integration tests, E2E tests, load tests, or mock generation.
Install
Quality Score: 85/100
Skill Content
Details
- Author
- johnqtcg
- Repository
- johnqtcg/awesome-skills
- Created
- 6 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
go-testing
Use when writing or reviewing Go tests — table-driven tests and subtests, t.Helper/t.Cleanup, parallelism, fakes vs mocks, golden files, httptest, integration tests behind build tags, benchmarks and fuzzing. Triggers on _test.go files, `go test` failures, or questions about how to test Go code.
go-testing
Use when writing or fixing Go tests — table-driven cases, parallel safety, helpers, fakes, fuzzing, deterministic time (testing/synctest), goroutine leak detection (goleak), HTTP handlers. Apply proactively when a function gets a new test or a test is flaky. Benchmark methodology: see go-benchmark.
go-tests
Enforces idiomatic Go testing — table-driven cases with subtests, the standard library over assertion frameworks, t.Cleanup for teardown, httptest for HTTP, golden files, fuzzing, and benchmarks that measure. Use when writing or reviewing Go tests, and when the user mentions table tests, t.Run, t.Parallel, testify, testdata, golden files, httptest, go test -race, coverage, benchmarks, fuzz, or asks "how do I test this in Go".