globals

package
v2.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package `globals` provides an interface to alter the global state of ginkgo suite.

ginkgo currently registers a few singleton global vars that hold all the test blocks and failure management. These vars are global per package, which means that only one Suite definition can coexist in one package.

However, there can be some use cases where applications using ginkgo may want to have a bit more control about this. For instance, a package may be using ginkgo to dynamically generate different tests and groups depending on some configuration. In this particular case, if the application wants to test how these different groups are generated, they will need access to change these global variables, so they can re-generate this global state, and ensure that different configuration generate indeed different tests.

Note that this package is not intended to be used as part of normal ginkgo setups, and usually, you will never need to worry about the global state of ginkgo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset

func Reset()

Reset calls `global.InitializeGlobals()` which will basically create a new instance of Suite, and therefore, will effectively reset the global variables to the init state. This will effectively remove all groups, tests and blocks that were added to the Suite.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL