Registry / testing / steinfletcher-apitest

steinfletcher-apitest

JSON →
library1.6.0gogounverified

A simple and expressive API testing framework for Go, supporting HTTP endpoint testing with assertions.

go get github.com/steinfletcher/apitest
INSTALL
IMPORT
SIG · STEINFLETCHER-APIT
S
steinfletcher-apitest
testinggov1.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

apitest
github.com/steinfletcher/apitest

Test an HTTP handler with GET request and assert response

package main import ( "net/http" "testing" "github.com/steinfletcher/apitest" ) func TestAPI(t *testing.T) { apitest.New(). Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("ok")) })). Get("/"). Expect(t). Body("ok"). Status(http.StatusOK). End() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
steinfletcher-apitest — go get steinfletcher-apitest · libregistry