test(01-02): add failing test for typed events and context
- Cover Fire/Collect/UntilHandled, priority, panics and bus isolation - Require towel actor/org/collection/locale accessors on context - Assert hello command demonstrates all three dispatch modes
This commit is contained in:
@@ -7,8 +7,21 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.golem15.com/golem15/summercms/compass"
|
||||
)
|
||||
|
||||
func TestEventBusesAreAppScoped(t *testing.T) {
|
||||
a := New(&compass.Config{})
|
||||
b := New(&compass.Config{})
|
||||
if a.Events == nil || b.Events == nil {
|
||||
t.Fatal("App must own an event bus")
|
||||
}
|
||||
if a.Events == b.Events {
|
||||
t.Fatal("apps must not share a bus")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDoesNotImportParty(t *testing.T) {
|
||||
entries, err := os.ReadDir(".")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user