spec

package module
v0.0.0-...-3edf602 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(engine Engine, handler Handler)

Types

type Element

type Element interface {
	Test() Test
	Hook() Hook
	Engine() Engine
	IsTest() bool
	IsHook() bool
	IsEngine() bool
}

func AfterAll

func AfterAll(lines ...Evaluable) Element

func AfterEach

func AfterEach(lines ...Evaluable) Element

func BeforeAll

func BeforeAll(lines ...Evaluable) Element

func BeforeEach

func BeforeEach(lines ...Evaluable) Element

func Describe

func Describe(title string, body ...Element) Element

func Inline

func Inline(line Fallible) Element

func It

func It(title string, lines ...Fallible) Element

func Let

func Let[T any](variable Variable[T], cache func() T) Element

type Engine

type Engine interface {
	// contains filtered or unexported methods
}

func Define

func Define(title string, body ...Element) Engine

type Evaluable

type Evaluable func()

func (Evaluable) Call

func (it Evaluable) Call() (ret error)

type Fallible

type Fallible func() error

func (Fallible) Call

func (it Fallible) Call() (ret error)

type Handler

type Handler func(err error)

func (Handler) Call

func (it Handler) Call(err error)

type Hook

type Hook interface {
	// contains filtered or unexported methods
}

type Test

type Test interface {
	// contains filtered or unexported methods
}

type Variable

type Variable[T any] interface {
	Value() T
	Clear()
	ClearCache(func() T)
}

func Var

func Var[T any](def T) Variable[T]

Jump to

Keyboard shortcuts

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