File: init.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 (28 lines) | stat: -rw-r--r-- 411 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
package global

import (
	"github.com/onsi/ginkgo/v2/internal"
)

var Suite *internal.Suite
var Failer *internal.Failer
var backupSuite *internal.Suite

func init() {
	InitializeGlobals()
}

func InitializeGlobals() {
	Failer = internal.NewFailer()
	Suite = internal.NewSuite()
}

func PushClone() error {
	var err error
	backupSuite, err = Suite.Clone()
	return err
}

func PopClone() {
	Suite = backupSuite
}