Skip to content

Commit 6188690

Browse files
author
Simon Prochazka
committed
test: add test for scopes with dashes
1 parent 354dc11 commit 6188690

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

parse_commit_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ func TestParseCommitMessage(t *testing.T) {
2121
"chore: test\n\nsomething more here\nRefs: #12 and #13": Commit{Category: "chore", Scope: "", Heading: "test", Body: "something more here", Issues: []int{12, 13}},
2222
"chore: add something\n": Commit{Category: "chore", Heading: "add something"},
2323
"chore(ci): added new CI stuff\n": Commit{Category: "chore", Scope: "ci", Heading: "added new CI stuff"},
24-
"chore(a b c d): added new CI stuff\n": Commit{Category: "chore", Scope: "a b c d", Heading: "added new CI stuff"},
25-
"chore(><(((*>): added new CI stuff\n": Commit{Category: "chore", Scope: "><(((*>", Heading: "added new CI stuff"},
24+
"chore(a b c d): added new CI stuff\n": Commit{Category: "chore", Scope: "a b c d", Heading: "added new CI stuff"},
25+
"chore(><(((*>): added new CI stuff\n": Commit{Category: "chore", Scope: "><(((*>", Heading: "added new CI stuff"},
2626
"feat: added a new feature\n": Commit{Category: "feat", Heading: "added a new feature"},
2727
"fix!: breaking change\n": Commit{Category: "fix", Breaking: true, Heading: "breaking change"},
2828
"fix(security)!: breaking\n": Commit{Category: "fix", Scope: "security", Breaking: true, Heading: "breaking"},
@@ -34,6 +34,7 @@ func TestParseCommitMessage(t *testing.T) {
3434
": nope\n": Commit{Heading: "nope"},
3535
"fix tests\n": Commit{Heading: "fix tests\n"},
3636
"test(full): a heading\n\nbody is here\nit can have multiple lines": Commit{Category: "test", Scope: "full", Heading: "a heading", Body: "body is here\nit can have multiple lines"},
37+
"test(dashed-scope): some heading\n": Commit{Category: "test", Scope: "dashed-scope", Heading: "some heading"},
3738
}
3839

3940
for test, expected := range tests {

0 commit comments

Comments
 (0)