wstest

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package wstest provides test helpers for wspulse/hub.

Import this package only in _test.go files to avoid pulling test infrastructure into production binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestHub

func NewTestHub(t testing.TB, connect wspulse.ConnectFunc, opts ...wspulse.HubOption) string

NewTestHub creates an in-process test server for use in application tests. It returns the WebSocket URL (ws://...) ready for client.Dial. The server and its HTTP listener are automatically cleaned up when the test ends.

Types

This section is empty.

Jump to

Keyboard shortcuts

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