CtrlK
BlogDocsLog inGet started
Tessl Logo

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com/stretchr/testify.

87

1.59x
Quality

86%

Does it follow best practices?

Impact

91%

1.59x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Evaluation results

75%

7%

API Response Serializer: Test Suite

JSON comparison and mock Unset in Go tests

Criteria
Baseline
With context

JSONEq for JSON output

100%

100%

No string equal for JSON

100%

100%

Struct pointer not compared by address

100%

100%

EqualExportedValues or dereference

53%

100%

Unset() used

0%

0%

Different return after Unset

50%

0%

mock.AnythingOfType used

100%

100%

AssertExpectations called

100%

100%

is/must naming

0%

100%

100%

25%

Audit Logging Service: Batch Threshold Tests

Mock side effects and detailed call verification

Criteria
Baseline
With context

m.Called() in Record mock

100%

100%

m.Called() in Flush mock

100%

100%

.Run() argument capture

100%

100%

Captured field assertion

66%

100%

AssertNotCalled for Flush

100%

100%

Call count verification

100%

100%

Large-batch Flush verification

100%

100%

AssertExpectations present

0%

100%

mock.Anything for context

0%

100%

100%

72%

Stats Calculator Test Suite

Testify assertion method selection

Criteria
Baseline
With context

ElementsMatch for tags

0%

100%

InDelta for Mean

33%

100%

InDelta for StdDev

33%

100%

Regexp for JobID

53%

100%

WithinDuration for ComputedAt

33%

100%

ErrorContains for empty input

0%

100%

require for error precondition

50%

100%

Repository
samber/cc-skills-golang
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.