feat: export BatchMsg

There's no good reason to keep it private. Exporting it helps
testability, debugging, and allows for a few special model.Update
implementations.
This commit is contained in:
treilik
2021-06-22 15:59:22 +02:00
committed by Christian Muehlhaeuser
parent 80f44c9384
commit 918d35746b
4 changed files with 8 additions and 8 deletions

View File

@@ -94,13 +94,13 @@ func TestBatch(t *testing.T) {
})
t.Run("single cmd", func(t *testing.T) {
b := Batch(Quit)()
if l := len(b.(batchMsg)); l != 1 {
if l := len(b.(BatchMsg)); l != 1 {
t.Fatalf("expected a []Cmd with len 1, got %d", l)
}
})
t.Run("mixed nil cmds", func(t *testing.T) {
b := Batch(nil, Quit, nil, Quit, nil, nil)()
if l := len(b.(batchMsg)); l != 2 {
if l := len(b.(BatchMsg)); l != 2 {
t.Fatalf("expected a []Cmd with len 2, got %d", l)
}
})