1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
package fail_fixture_test
import (
. "github.com/onsi/ginkgo/v2"
)
var _ = Describe("GinkgoT", func() {
It("synchronous failures with GinkgoT().Fail", func() {
GinkgoT().Fail()
println("NEVER SEE THIS")
})
DescribeTable("DescribeTable",
func() {
GinkgoT().Fail()
},
Entry("a TableEntry constructed by Entry"),
)
It("tracks line numbers correctly when GinkgoT().Helper() is called", func() {
ginkgoTHelper()
})
It("tracks the actual line number when no helper is used", func() {
ginkgoTNoHelper()
})
})
var ginkgoTNoHelper = func() {
GinkgoT().Fail()
}
var ginkgoTHelper = func() {
GinkgoT().Helper()
GinkgoT().Fail()
}
|