From 49ae9f52f71ff03d5add09b78e02630742e4be20 Mon Sep 17 00:00:00 2001 From: jo Date: Wed, 13 Nov 2024 15:17:59 +0100 Subject: [PATCH] test: ensure commit with body can be parsed --- .../conventionalcommits_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/commitparser/conventionalcommits/conventionalcommits_test.go b/internal/commitparser/conventionalcommits/conventionalcommits_test.go index ddfbaf4..d301829 100644 --- a/internal/commitparser/conventionalcommits/conventionalcommits_test.go +++ b/internal/commitparser/conventionalcommits/conventionalcommits_test.go @@ -125,6 +125,24 @@ func TestAnalyzeCommits(t *testing.T) { }, wantErr: assert.NoError, }, + + { + name: "success with body", + commits: []git.Commit{ + { + Message: "feat: some thing (hz/fl!144)\n\nFixes #15\n\nDepends on !143", + }, + }, + expectedCommits: []commitparser.AnalyzedCommit{ + { + Commit: git.Commit{Message: "feat: some thing (hz/fl!144)\n\nFixes #15\n\nDepends on !143"}, + Type: "feat", + Description: "some thing (hz/fl!144)", + BreakingChange: false, + }, + }, + wantErr: assert.NoError, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {