MCPcopy Index your code
hub / github.com/git-bug/git-bug / normalizeParsedComments

Function normalizeParsedComments

commands/bug/bug_comment_test.go:116–132  ·  view source on GitHub ↗
(t *testing.T, comments []parsedComment)

Source from the content-addressed store, hash-verified

114}
115
116func normalizeParsedComments(t *testing.T, comments []parsedComment) []parsedComment {
117 t.Helper()
118
119 prefix := 0x1234567
120 date, err := time.Parse(gitDateFormat, "Fri Aug 19 07:00:00 2022 +1900")
121 require.NoError(t, err)
122
123 var out []parsedComment
124
125 for i, comment := range comments {
126 comment.id = fmt.Sprintf("%7x", prefix+i)
127 comment.date = date.Add(time.Duration(i) * time.Minute)
128 out = append(out, comment)
129 }
130
131 return out
132}
133
134func requireCommentsEqual(t *testing.T, golden string, env *execenv.Env) {
135 t.Helper()

Callers 1

requireCommentsEqualFunction · 0.85

Calls 3

HelperMethod · 0.80
AddMethod · 0.80
ParseMethod · 0.65

Tested by

no test coverage detected