mirror of
https://github.com/git-chglog/git-chglog.git
synced 2026-01-23 02:15:12 +00:00
chore: Fix testcase depending on datetime
This commit is contained in:
parent
8f3171633c
commit
cd9684604b
1 changed files with 14 additions and 14 deletions
|
|
@ -48,23 +48,23 @@ func TestGeneratorWithTypeScopeSubject(t *testing.T) {
|
|||
testName := "type_scope_subject"
|
||||
|
||||
setup(testName, func(git gitcmd.Client) {
|
||||
git.Exec("commit", "-m", "--allow-empty", "chore(*): First commit")
|
||||
git.Exec("commit", "--allow-empty", "-m", "feat(core): Add foo bar")
|
||||
git.Exec("commit", "--allow-empty", "-m", "docs(readme): Update usage #123")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Mon Jan 1 00:00:00 2018 +0900", "-m", "chore(*): First commit")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Mon Jan 1 00:01:00 2018 +0900", "-m", "feat(core): Add foo bar")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Mon Jan 1 00:02:00 2018 +0900", "-m", "docs(readme): Update usage #123")
|
||||
|
||||
git.Exec("tag", "1.0.0")
|
||||
git.Exec("commit", "--allow-empty", "-m", "feat(parser): New some super options #333")
|
||||
git.Exec("commit", "--allow-empty", "-m", "Merge pull request #999 from tsuyoshiwada/patch-1")
|
||||
git.Exec("commit", "--allow-empty", "-m", "Merge pull request #1000 from tsuyoshiwada/patch-1")
|
||||
git.Exec("commit", "--allow-empty", "-m", "Revert \"feat(core): Add foo bar @mention and issue #987\"")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Tue Jan 2 00:00:00 2018 +0900", "-m", "feat(parser): New some super options #333")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Tue Jan 2 00:01:00 2018 +0900", "-m", "Merge pull request #999 from tsuyoshiwada/patch-1")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Tue Jan 2 00:02:00 2018 +0900", "-m", "Merge pull request #1000 from tsuyoshiwada/patch-1")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Tue Jan 2 00:03:00 2018 +0900", "-m", "Revert \"feat(core): Add foo bar @mention and issue #987\"")
|
||||
|
||||
git.Exec("tag", "1.1.0")
|
||||
git.Exec("commit", "--allow-empty", "-m", "feat(context): Online breaking change\n\nBREAKING CHANGE: Online breaking change message.")
|
||||
git.Exec("commit", "--allow-empty", "-m", "feat(router): Muliple breaking change\n\nThis is body,\n\nBREAKING CHANGE:\nMultiple\nbreaking\nchange message.")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Wed Jan 3 00:00:00 2018 +0900", "-m", "feat(context): Online breaking change\n\nBREAKING CHANGE: Online breaking change message.")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Wed Jan 3 00:01:00 2018 +0900", "-m", "feat(router): Muliple breaking change\n\nThis is body,\n\nBREAKING CHANGE:\nMultiple\nbreaking\nchange message.")
|
||||
|
||||
git.Exec("tag", "2.0.0-beta.0")
|
||||
git.Exec("commit", "--allow-empty", "-m", "refactor(context): gofmt")
|
||||
git.Exec("commit", "--allow-empty", "-m", "fix(core): Fix commit\n\nThis is body message.")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Thu Jan 4 00:00:00 2018 +0900", "-m", "refactor(context): gofmt")
|
||||
git.Exec("commit", "--allow-empty", "--date", "Thu Jan 4 00:01:00 2018 +0900", "-m", "fix(core): Fix commit\n\nThis is body message.")
|
||||
})
|
||||
|
||||
gen := NewGenerator(&Config{
|
||||
|
|
@ -120,7 +120,7 @@ func TestGeneratorWithTypeScopeSubject(t *testing.T) {
|
|||
gen.Generate(buf, "")
|
||||
|
||||
assert.Equal(`<a name="2.0.0-beta.0"></a>
|
||||
## 2.0.0-beta.0 (2018-02-10)
|
||||
## 2.0.0-beta.0 (2018-01-03)
|
||||
|
||||
### Features
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ Online breaking change message.
|
|||
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
## 1.1.0 (2018-02-10)
|
||||
## 1.1.0 (2018-01-02)
|
||||
|
||||
### Features
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ Online breaking change message.
|
|||
|
||||
|
||||
<a name="1.0.0"></a>
|
||||
## 1.0.0 (2018-02-10)
|
||||
## 1.0.0 (2018-01-01)
|
||||
|
||||
### Features
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue