File: reporting_fixture_test.go

package info (click to toggle)
golang-github-onsi-ginkgo-v2 2.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,060 kB
  • sloc: javascript: 59; makefile: 23; sh: 14
file content (46 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (2)
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
42
43
44
45
46
package reporting_fixture_test

import (
	"time"

	. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("reporting test", func() {
	It("passes", func() {
	})

	Describe("labelled tests", Label("dog"), func() {
		It("is labelled", Label("dog", "cat"), func() {
		})
	})

	It("fails", func() {
		GinkgoWriter.Print("some ginkgo-writer output")
		Fail("fail!")
	})

	It("panics", func() {
		panic("boom")
	})

	It("has a progress report", func() {
		GinkgoWriter.Print("some ginkgo-writer preamble")
		time.Sleep(300 * time.Millisecond)
		GinkgoWriter.Print("some ginkgo-writer postamble")
	}, PollProgressAfter(50*time.Millisecond))

	PIt("is pending", func() {

	})

	It("is skipped", func() {
		Skip("skip")
	})

	It("times out and fails during cleanup", func(ctx SpecContext) {
		<-ctx.Done()
		DeferCleanup(func() { Fail("double-whammy") })
		Fail("failure-after-timeout")
	}, NodeTimeout(time.Millisecond*100))
})