MCPcopy Create free account
hub / github.com/github/gh-aw / TestGetCommentEventNames

Function TestGetCommentEventNames

pkg/workflow/comment_test.go:247–259  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

245}
246
247func TestGetCommentEventNames(t *testing.T) {
248 mappings := []CommentEventMapping{
249 {EventName: "issues", Types: []string{"opened"}},
250 {EventName: "issue_comment", Types: []string{"created"}},
251 }
252
253 result := GetCommentEventNames(mappings)
254
255 expected := []string{"issues", "issue_comment"}
256 if !reflect.DeepEqual(result, expected) {
257 t.Errorf("Expected %v, got %v", expected, result)
258 }
259}

Callers

nothing calls this directly

Calls 2

GetCommentEventNamesFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected