MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestHasCallback

Function TestHasCallback

chainbus/bus_test.go:33–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestHasCallback(t *testing.T) {
34 bus := New()
35 bus.Subscribe("/event/test", func() {})
36 if bus.HasCallback("/event/test2") {
37 t.Fail()
38 }
39 if !bus.HasCallback("/event/test") {
40 t.Fail()
41 }
42}
43
44func TestSubscribe(t *testing.T) {
45 bus := New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
SubscribeMethod · 0.65
HasCallbackMethod · 0.65

Tested by

no test coverage detected