MCPcopy Index your code
hub / github.com/onsi/gomega

github.com/onsi/gomega @v1.42.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.42.1 ↗
969 symbols 2,269 edges 117 files 335 documented · 35% 64 cross-repo links
README

Gomega: Ginkgo's Preferred Matcher Library

test

Jump straight to the docs to learn about Gomega, including a list of all available matchers.

If you have a question, comment, bug report, feature request, etc. please open a GitHub issue.

Using Gomega with Claude Code

Gomega ships a set of Claude Code skills as a plugin, so an agent writing assertions in your suite has Gomega's idioms — the full matcher catalog, Eventually/Consistently, and the gstruct/ghttp/gexec/gbytes/gleak/gmeasure sub-libraries — on hand. The Gomega repo doubles as the plugin marketplace, so installation is two commands. From inside Claude Code:

/plugin marketplace add onsi/gomega
/plugin install gomega@gomega

(or non-interactively: claude plugin marketplace add onsi/gomega then claude plugin install gomega@gomega)

This installs a family of gomega:* skills that activate automatically while you write tests. See the docs for the full list.

Ginkgo: a BDD Testing Framework for Golang

Learn more about Ginkgo here

Community Matchers

A collection of community matchers is available on the wiki.

License

Gomega is MIT-Licensed

The ConsistOf matcher uses goraph which is embedded in the source to simplify distribution. goraph has an MIT license.

Extension points exported contracts — how you extend this code

GomegaMatcher (Interface)
All Gomega matchers must implement the GomegaMatcher interface For details on writing custom matchers, check out: http: [67 …
types/types.go
NestingMatcher (Interface)
A stateful matcher that nests other matchers within it and preserves the error types of the nested matcher failures. [3 …
gstruct/errors/nested_types.go
BufferProvider (Interface)
Objects satisfying the BufferProvider can be used with the Say matcher. [1 implementers]
gbytes/say_matcher.go
GomegaStringer (Interface)
GomegaStringer allows for custom formatting of objects for gomega. [1 implementers]
format/format.go
RoundTripperFunc (FuncType)
Helper type for creating a RoundTripper from a function
ghttp/test_server.go
Identifier (FuncType)
Function for identifying (mapping) elements.
gstruct/elements.go
PollingSignalError (Interface)
(no doc) [1 implementers]
internal/polling_signal_error.go
Exiter (Interface)
(no doc) [1 implementers]
gexec/exit_matcher.go

Core symbols most depended-on inside this repo

Message
called by 111
format/format.go
Object
called by 100
format/format.go
String
called by 38
gmeasure/stats.go
Expect
called by 30
types/types.go
Error
called by 30
types/types.go
C
called by 29
gmeasure/table/table.go
Match
called by 29
matchers/type_support.go
Should
called by 20
types/types.go

Shape

Method 531
Function 282
Struct 110
TypeAlias 23
Interface 17
FuncType 6

Languages

Go100%

Modules by API surface

matchers.go59 symbols
types/types.go47 symbols
ghttp/handlers.go40 symbols
internal/async_assertion.go39 symbols
gmeasure/experiment.go28 symbols
ghttp/test_server.go27 symbols
format/format.go25 symbols
gomega_dsl.go24 symbols
matchers/type_support.go21 symbols
gmeasure/table/table.go20 symbols
internal/polling_signal_error.go19 symbols
internal/gomega.go19 symbols

Dependencies from manifests, versioned

go.yaml.in/yaml/v3v3.0.4 · 1×
golang.org/x/netv0.56.0 · 1×
golang.org/x/textv0.38.0 · 1×
google.golang.org/protobufv1.36.7 · 1×

For agents

$ claude mcp add gomega \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact