testkit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect[T any](t *testing.T, ctx context.Context, ch <-chan T) []T

Collect drains the channel or fails the test if the context expires.

func SourceOf

func SourceOf[T any](xs ...T) <-chan T

SourceOf emits the provided values then closes the channel.

func Within

Within returns a context with timeout for coordinating test execution.

Types

type StageRecorder

type StageRecorder struct {
	// contains filtered or unexported fields
}

StageRecorder records StageInfo events emitted by Hooks for inspection in tests.

func NewStageRecorder

func NewStageRecorder() *StageRecorder

NewStageRecorder constructs a StageRecorder.

func (*StageRecorder) Hooks

func (r *StageRecorder) Hooks() sazanami.Hooks

Hooks returns a Hooks struct that records stage lifecycle events.

func (*StageRecorder) Snapshot

func (r *StageRecorder) Snapshot() []sazanami.StageInfo

Snapshot returns a copy of the recorded StageInfo sequence.

Jump to

Keyboard shortcuts

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