API Reference
dagnatstest
import "github.com/danmestas/dagnats/dagnatstest"Package dagnatstest provides test helpers for DagNats workflows. It starts an embedded NATS server with all required streams and KV buckets in a single call, ready for workflow testing.
Usage:
func TestMyWorkflow(t *testing.T) {
nc := dagnatstest.Server(t)
// nc is ready — register workflows, start workers, etc.
}Index
func Server
func Server(t *testing.T) *nats.ConnServer starts an embedded NATS server with JetStream and all required streams/KV buckets provisioned. Returns the connected client. Server and connection are cleaned up automatically when the test ends.
Generated by gomarkdoc