19 lines
266 B
Go
19 lines
266 B
Go
package sway
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestSubscribe(t *testing.T) {
|
|
events, err := Subscribe(context.Background(), EventTypeWindow, EventTypeWorkspace)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
for event := range events {
|
|
fmt.Println(event)
|
|
}
|
|
}
|