Skip to content

Commit 46a430f

Browse files
committed
docs: Improve internal testing tool docs
1 parent 8d0015f commit 46a430f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/testing/gosttest/gomega_suite.go

+6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ import (
66
"github.com/stretchr/testify/suite"
77
)
88

9+
// GomegaSuite is a specialised [suite.Suite] that provides support for the
10+
// [gomega] assertion library by providing a [GomegaSuite.Expect] function
11+
// automatically initializes gomega with
912
type GomegaSuite struct {
1013
suite.Suite
1114
gomega gomega.Gomega
1215
}
1316

17+
// Expect is wraps [gomega/Gomega.Expect], passing the correct [testing/T]. This
18+
// supports gomega matchers for verification; which can in some cases provide
19+
// more expressive tests.
1420
func (s *GomegaSuite) Expect(actual interface{}, extra ...interface{}) types.Assertion {
1521
if s.gomega == nil {
1622
s.gomega = gomega.NewWithT(s.T())

0 commit comments

Comments
 (0)