Documentation
¶
Overview ¶
Package cmdtest provides shared test helpers for command tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInvocation ¶
NewInvocation creates a cmd.Invocation suitable for testing, with a profile pointed at the given test server.
func WriteJSONAPI ¶
func WriteJSONAPI(w http.ResponseWriter, payload any)
WriteJSONAPI writes a JSON:API response with the correct content type.
Types ¶
type RouteMap ¶
type RouteMap map[string]http.HandlerFunc
RouteMap maps "METHOD /path" to a handler function for use in test servers.
Click to show internal directories.
Click to hide internal directories.