lua

package
v0.1.0-pre.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToGoType

func ConvertToGoType(v lua.LValue) any

func GenerateSpec

func GenerateSpec(w io.Writer, runners []spec.Runner, cfg any)

Types

type JSONReporter

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

func NewJSONReporter

func NewJSONReporter(w io.Writer) *JSONReporter

func (*JSONReporter) Error

func (r *JSONReporter) Error(msg string, args ...any)

func (*JSONReporter) RunFile

func (r *JSONReporter) RunFile(ctx context.Context, filename string, fn func(Reporter))

func (*JSONReporter) RunTest

func (r *JSONReporter) RunTest(ctx context.Context, runner, name string, fn func(Reporter))

type Manager

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

func New

func New(newConfigFn func() any, setup SetupFunc, runners ...spec.Runner) (*Manager, error)

func (*Manager) GenerateSpec

func (m *Manager) GenerateSpec(dir string) error

func (*Manager) Run

func (m *Manager) Run(ctx context.Context, dir string, reporter Reporter) error

type Reporter

type Reporter interface {
	RunFile(ctx context.Context, filename string, fn func(Reporter))
	RunTest(ctx context.Context, runner, name string, fn func(Reporter))
	Error(msg string, args ...any)
}

type SetupFunc

type SetupFunc func(ctx context.Context, dir string, config any) (runners []spec.Runner, close func(), err error)

type TestReporter

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

func NewTestReporter

func NewTestReporter(t *testing.T) *TestReporter

func (*TestReporter) Error

func (r *TestReporter) Error(msg string, args ...any)

func (*TestReporter) RunFile

func (r *TestReporter) RunFile(ctx context.Context, filename string, fn func(Reporter))

func (*TestReporter) RunTest

func (r *TestReporter) RunTest(ctx context.Context, runner string, name string, fn func(Reporter))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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