onsi/gomega

Ginkgo's Preferred Matcher Library

2.4kStars on the repository
14Mods indexed here, across every type
5d agoLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

assertions

01

onsi/gomega

Skill Claude CodeCodex

Write correct synchronous Gomega assertions — Expect/Ω notation, the To/NotTo/ToNot/Should/ShouldNot equivalences, the multi-return error idiom, Succeed vs HaveOccurred, the .Error() chaining form, annotating assertions (format-string and func()string), tuning failure output via the format subpackage…

2.4k +3 5d ago A 145 tokens original MIT

async

02

onsi/gomega

Skill Claude CodeCodex

Polling assertions in Gomega — Eventually (poll until it passes) and Consistently (must keep passing), the func(g Gomega) callback idiom, WithTimeout/WithPolling/Within/ProbeEvery, WithContext and Ginkgo SpecContext, StopTrying/TryAgainAfter bail-outs, MustPassRepeatedly, and default-interval tuning. Use when an…

2.4k +3 5d ago A 104 tokens original MIT

composing-matchers

03

onsi/gomega

Skill Claude CodeCodex

Build compound Gomega assertions by combining matchers — And/SatisfyAll (all pass), Or/SatisfyAny (any pass), Not (negate), WithTransform to map the actual before matching, Satisfy for an ad-hoc predicate, HaveValue to dereference pointers/interfaces, HaveField for struct fields and method results, HaveEach for every…

2.4k +3 5d ago A 136 tokens original MIT

custom-matchers

04

onsi/gomega

Skill Claude CodeCodex

Writing your own Gomega matchers — the GomegaMatcher interface (Match/FailureMessage/NegatedFailureMessage), gcustom.MakeMatcher with message templates and template data, the format package helpers (format.Message/format.Object), MatchMayChangeInTheFuture and StopTrying for Eventually/Consistently, and how to test and…

2.4k +3 5d ago A 96 tokens original MIT

gbytes

05

onsi/gomega

Skill Claude CodeCodex

Testing streaming io buffers with gbytes — gbytes.NewBuffer() (an io.Writer also returned by gexec sessions), the Say(regexp) matcher that forward-scans from a moving read cursor, the canonical Eventually(buffer).Should(Say(...)) streaming pattern, sequential cursor-advancing Say calls, Contents()…

2.4k +3 5d ago A 123 tokens original MIT

gexec

06

onsi/gomega

Skill Claude CodeCodex

Testing external processes with gexec — compile binaries with Build/BuildWithEnvironment/BuildIn and CleanupBuildArtifacts, start them with Start returning a Session, await exit with the Exit matcher (Eventually(session).Should(Exit(0))), Wait/ExitCode, signal via Kill/Terminate/Interrupt/Signal and package-level…

2.4k +3 5d ago A 110 tokens original MIT

ghttp

07

onsi/gomega

Skill Claude CodeCodex

The ghttp test HTTP server for testing HTTP clients — NewServer/NewTLSServer, AppendHandlers, the Verify assertions (VerifyRequest/VerifyHeader/VerifyHeaderKV/VerifyJSON/VerifyForm/VerifyBasicAuth/VerifyContentType/VerifyBody), RespondWith/RespondWithJSONEncoded(Ptr), CombineHandlers, RouteToHandler for unordered…

2.4k +3 5d ago A 100 tokens original MIT

gleak

08

onsi/gomega

Skill Claude CodeCodex

Skill "gleak" from onsi/gomega, covering gleak: detecting leaked goroutines, import, the canonical pattern, gotchas and haveleaked([ignoring...]).

2.4k +3 5d ago A 126 tokens original MIT

gmeasure

09

onsi/gomega

Skill Claude CodeCodex

Benchmark and measure Go code with gmeasure — an Experiment groups named Measurements, recorded via RecordValue/RecordDuration/MeasureDuration or repeated Sample/SampleValue/SampleDuration with SamplingConfig, timed inline with a Stopwatch, summarized through GetStats/Stats (StatMin/Max/Mean/Median/StdDev…

2.4k +3 5d ago A 129 tokens original MIT

gstruct

10

onsi/gomega

Skill Claude CodeCodex

Deep, partial matching of nested structs, slices, maps, and pointers with gstruct — MatchAllFields/MatchFields/Fields, MatchAllElements/MatchElements/Elements (idFn), MatchAllKeys/MatchKeys/Keys, PointTo, and the IgnoreExtras/IgnoreMissing/IgnoreUnexportedExtras/AllowDuplicates options, plus Ignore()/Reject(). Use…

2.4k +3 5d ago A 104 tokens original MIT

matchers

11

onsi/gomega

Skill Claude CodeCodex

The complete catalog of Gomega's built-in matchers, grouped by category — equivalence (Equal/BeEquivalentTo/BeComparableTo/BeIdenticalTo/BeAssignableToTypeOf), presence (BeNil/BeZero/BeEmpty), truthiness (BeTrue/BeFalse/BeTrueBecause), errors (HaveOccurred/Succeed/MatchError), channels (Receive/BeClosed/BeSent)…

2.4k +3 5d ago A 163 tokens original MIT

overview

12

onsi/gomega

Skill Claude CodeCodex

The Gomega mental model for writing assertions in Go — the Expect/Ω notation, matchers-are-values, the multi-return error idiom, synchronous vs asynchronous (Eventually/Consistently) assertions, and a map of the whole library including the gstruct/ghttp/gexec/gbytes/gleak/gmeasure sub-libraries. Use this first when…

2.4k +3 5d ago A 104 tokens original MIT