Skip to content

Commit

Permalink
test(event): Increase the proportion of unit tests. (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Flc゛ <[email protected]>
  • Loading branch information
flc1125 authored Feb 17, 2024
1 parent 1b668b4 commit d603a9c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions event/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,14 @@ func TestDispatcher(t *testing.T) {
assert.Equal(t, Event("test3"), r4.event)
assert.Equal(t, "test3 data", r4.data)
}

func TestEvent_String(t *testing.T) {
assert.Equal(t, "test", Event("test").String())
assert.Equal(t, "test2", Event("test2").String())
}

func TestDefaultRecovery(t *testing.T) {
assert.NotPanics(t, func() {
DefaultRecovery("test", &testListener{}, "test", "test data")
})
}

0 comments on commit d603a9c

Please sign in to comment.