diff --git a/pkg/changelog/markdown_test.go b/pkg/changelog/markdown_test.go index f55da50..bdc986f 100644 --- a/pkg/changelog/markdown_test.go +++ b/pkg/changelog/markdown_test.go @@ -35,6 +35,41 @@ func TestMarkdownGeneratorGenerate(t *testing.T) { }, }, }, + { + name: "many commits", + version: "v1.0.0", + t: time.Date(2020, 1, 18, 0, 0, 0, 0, time.Local), + commits: []convention.Commit{ + { + RawHeader: "feat: new feature", + Type: convention.FeatType, + }, + { + RawHeader: "feat: support new client", + Type: convention.FeatType, + }, + { + RawHeader: "fix: new fix", + Type: convention.FixType, + }, + { + RawHeader: "fix: wrong color", + Type: convention.FixType, + }, + { + RawHeader: "chore: new build", + Type: convention.ChoreType, + }, + { + RawHeader: "chore(github): release on github", + Type: convention.ChoreType, + }, + { + RawHeader: "chore(gitlab): release on gitlab", + Type: convention.ChoreType, + }, + }, + }, } for _, tc := range tests { diff --git a/pkg/changelog/testdata/TestMarkdownGeneratorGenerate/many_commits.golden b/pkg/changelog/testdata/TestMarkdownGeneratorGenerate/many_commits.golden new file mode 100644 index 0000000..b1fc5ba --- /dev/null +++ b/pkg/changelog/testdata/TestMarkdownGeneratorGenerate/many_commits.golden @@ -0,0 +1,23 @@ +# CHANGELOG + +## v1.0.0 (2020-1-18) + +### Added + +- feat: new feature + +- feat: support new client + +### Fixed + +- fix: new fix + +- fix: wrong color + +### Others + +- chore: new build + +- chore(github): release on github + +- chore(gitlab): release on gitlab \ No newline at end of file