We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d0015f commit 46a430fCopy full SHA for 46a430f
internal/testing/gosttest/gomega_suite.go
@@ -6,11 +6,17 @@ import (
6
"github.com/stretchr/testify/suite"
7
)
8
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
12
type GomegaSuite struct {
13
suite.Suite
14
gomega gomega.Gomega
15
}
16
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.
20
func (s *GomegaSuite) Expect(actual interface{}, extra ...interface{}) types.Assertion {
21
if s.gomega == nil {
22
s.gomega = gomega.NewWithT(s.T())
0 commit comments