Skip to content
/ wstest Public
forked from posener/wstest

go websocket client for unit testing a websocket handler

License

Notifications You must be signed in to change notification settings

a8m/wstest

 
 

Repository files navigation

wstest

Build Status codecov GoDoc Go Report Card

A websocket client for unit-testing a websocket server

The gorilla organization provides full featured websocket implementation that the standard library lacks.

The standard library provides a httptest.ResponseRecorder struct that test an http.Handler without ListenAndServe, but is helpless when the connection is being hijacked by an http upgrader. This package provides a client to test just the http.Handler that uses an hijacker to hijack the connection and start a websocket session, without starting the server.

Get

go get -u github.com/posener/wstest

Example

See the example.

About

go websocket client for unit testing a websocket handler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.9%
  • Shell 2.1%