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 36 37 38 39 40 41
|
package preview_fixture_test
import (
"fmt"
"os"
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestPreviewFixture(t *testing.T) {
RegisterFailHandler(Fail)
if os.Getenv("PREVIEW") == "true" {
report := PreviewSpecs("PreviewFixture Suite", Label("suite-label"))
for _, spec := range report.SpecReports {
fmt.Println(spec.State, spec.FullText())
}
}
if os.Getenv("RUN") == "true" {
RunSpecs(t, "PreviewFixture Suite", Label("suite-label"))
}
}
var _ = Describe("specs", func() {
It("A", Label("elephant"), func() {
})
It("B", Label("elephant"), func() {
})
It("C", func() {
})
It("D", func() {
})
})
|