neomatest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(req *http.Request) ([]byte, error)

func DumpResponse

func DumpResponse(resp *http.Response) ([]byte, error)

func NewAdapter

func NewAdapter() core.Adapter

func NewContext

func NewContext(op *core.Operation, r *http.Request, w http.ResponseWriter) core.Context

func PrintRequest

func PrintRequest(req *http.Request)

func PrintResponse

func PrintResponse(resp *http.Response)

Types

type TB

type TB interface {
	Helper()
	Log(args ...any)
	Logf(format string, args ...any)
}

type TestAPI

type TestAPI interface {
	core.API
	DoCtx(ctx context.Context, method, path string, args ...any) *httptest.ResponseRecorder
	Do(method, path string, args ...any) *httptest.ResponseRecorder
}

func New

func New(tb TB, configs ...core.Config) (http.Handler, TestAPI)

func Wrap

func Wrap(tb TB, api core.API) TestAPI

Jump to

Keyboard shortcuts

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