File: skip_test.go

package info (click to toggle)
golang-github-onsi-ginkgo-v2 2.15.0-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 4,112 kB
  • sloc: javascript: 59; sh: 14; makefile: 7
file content (33 lines) | stat: -rw-r--r-- 998 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
package integration_test

import (
	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	"github.com/onsi/gomega/gexec"
)

var _ = Describe("Skipping Specs", func() {
	BeforeEach(func() {
		fm.MountFixture("skip")
	})

	It("should skip in all the possible ways", func() {
		session := startGinkgo(fm.PathTo("skip"), "--no-color", "-v")
		Eventually(session).Should(gexec.Exit(0))
		output := string(session.Out.Contents())

		Ω(output).ShouldNot(ContainSubstring("NEVER SEE THIS"))

		Ω(output).Should(ContainSubstring("a top level skip on line 9"))
		Ω(output).Should(ContainSubstring("skip_fixture_test.go:9"))

		Ω(output).Should(ContainSubstring("a sync SKIP"))

		Ω(output).Should(ContainSubstring("S [SKIPPED] ["))
		Ω(output).Should(ContainSubstring("a BeforeEach SKIP"))
		Ω(output).Should(ContainSubstring("S [SKIPPED] ["))
		Ω(output).Should(ContainSubstring("an AfterEach SKIP"))

		Ω(output).Should(ContainSubstring("0 Passed | 0 Failed | 0 Pending | 4 Skipped"))
	})
})