test(changelog): more test for generate changelog

main
hau 2020-12-17 18:02:12 +07:00
parent 7694e1e1c7
commit 562557dbcd
2 changed files with 58 additions and 0 deletions

View File

@ -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 {

View File

@ -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