e2e

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNevaBinary added in v0.36.1

func BuildNevaBinary(tb testing.TB, repoRoot string) string

BuildNevaBinary builds the neva CLI binary from repo root and returns its path.

func FindRepoRoot added in v0.34.0

func FindRepoRoot(tb testing.TB) string

FindRepoRoot finds the repository root using go env GOMOD.

func PrepareIsolatedNevaHome added in v0.36.1

func PrepareIsolatedNevaHome(repoRoot, homeDir string) error

PrepareIsolatedNevaHome creates an isolated Neva home and wires the local stdlib into it.

func Run

func Run(t *testing.T, args []string, opts ...Option) (stdout, stderr string)

Run executes the neva command with the given arguments and options. It returns captured stdout and stderr separately. The working directory is os.Getwd() (relies on go test running each package with cwd at that package). Most tests can ignore stderr: `out, _ := e2e.Run(...)` Tests that need stderr (e.g., panic cases) can use: `out, stderr := e2e.Run(...)` and combine if needed.

Types

type Option added in v0.34.0

type Option func(*config)

Option configures Run behavior.

func WithCode added in v0.34.0

func WithCode(code int) Option

WithCode sets the expected exit code (default is 0).

func WithDir added in v0.34.0

func WithDir(wd string) Option

WithDir sets the working directory for the command execution.

func WithStdin added in v0.34.0

func WithStdin(stdin string) Option

WithStdin sets stdin input for the command.

func WithTimeout added in v0.35.0

func WithTimeout(timeout time.Duration) Option

WithTimeout sets the maximum command execution time.

Jump to

Keyboard shortcuts

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