streamdeck-obs-replay/replay_test.go

22 lines
414 B
Go

package main
import (
"meow.tf/streamdeck/obs-replay/obsws"
"testing"
)
func Test_ReplayStatus(t *testing.T) {
c := &obsws.Client{Host: "localhost", Port: 4444}
if err := c.Connect(); err != nil {
t.Fatal(err)
}
c.AddEventHandler("StreamStatus", func(e obsws.Event) {
// Make sure to assert the actual event type.
t.Log("status:", e.(obsws.StreamStatusEvent).Replay)
})
<- make(chan struct{})
}