apptest

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestApp

func NewTestApp(t testing.TB, options ...fx.Option) (*app.App, func())

NewTestApp creates a new test application with Fx dependency injection. It returns the Fx app instance and the VEF application.

func NewTestAppWithErr

func NewTestAppWithErr(t testing.TB, options ...fx.Option) (*app.App, func(), error)

NewTestAppWithErr creates a new test application and returns any startup errors. Unlike NewTestApp, this function does not require the app to start successfully. It's useful for testing error conditions during app initialization.

Types

type MockConfig

type MockConfig struct{}

MockConfig implements config.Config for testing without file dependencies.

func (*MockConfig) Unmarshal

func (m *MockConfig) Unmarshal(key string, target any) error

Jump to

Keyboard shortcuts

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