apptesting

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package apptesting provides test helpers for constructing a real *app.App over in-memory SQLite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestConfig added in v0.6.0

func NewTestConfig(t *testing.T, opts ...ConfigOption) *config.Config

NewTestConfig returns a default Config with the given options applied.

func OpenApp

func OpenApp(t *testing.T) *app.App

OpenApp opens an *app.App backed by an in-memory SQLite store. The store is closed automatically when t completes.

Types

type ConfigOption added in v0.6.0

type ConfigOption func(*config.Config)

ConfigOption mutates a Config for test purposes.

func WithJSON added in v0.6.0

func WithJSON() ConfigOption

WithJSON sets the output format to JSON.

func WithQuiet added in v0.6.0

func WithQuiet() ConfigOption

WithQuiet sets quiet mode on the test config.

Jump to

Keyboard shortcuts

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