@@ -4,7 +4,7 @@ import m from '..';
4
4
test ( 'Parse GitHub issue' , t => {
5
5
t . deepEqual (
6
6
m ( 'GitHub' ) (
7
- 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fix o/r#4 #5 o/r#6 fix https://github.com/o/r/issues/7 https://github.com/o/r/issues/8 fix https://github.com/o/r/pull/9 https://github.com/o/r/pull/10 fixing #11 Duplicate OF #12 @user'
7
+ 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fix o/r#4 #5 o/r#6 fix https://github.com/o/r/issues/7 https://github.com/o/r/issues/8 fix https://github.com/o/r/pull/9 https://github.com/o/r/pull/10 fixing #11 Duplicate OF #12 Fix:#13 Fix: #14 Fix::#15 @user'
8
8
) ,
9
9
{
10
10
actions : {
@@ -15,6 +15,8 @@ test('Parse GitHub issue', t => {
15
15
{ raw : 'fix o/r#4' , action : 'Fix' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
16
16
{ raw : 'fix https://github.com/o/r/issues/7' , action : 'Fix' , slug : 'o/r' , prefix : undefined , issue : '7' } ,
17
17
{ raw : 'fix https://github.com/o/r/pull/9' , action : 'Fix' , slug : 'o/r' , prefix : undefined , issue : '9' } ,
18
+ { raw : 'Fix:#13' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '13' } ,
19
+ { raw : 'Fix: #14' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '14' } ,
18
20
] ,
19
21
duplicate : [ { raw : 'Duplicate OF #12' , action : 'Duplicate of' , slug : undefined , prefix : '#' , issue : '12' } ] ,
20
22
} ,
@@ -24,6 +26,7 @@ test('Parse GitHub issue', t => {
24
26
{ raw : 'https://github.com/o/r/issues/8' , slug : 'o/r' , prefix : undefined , issue : '8' } ,
25
27
{ raw : 'https://github.com/o/r/pull/10' , slug : 'o/r' , prefix : undefined , issue : '10' } ,
26
28
{ raw : '#11' , slug : undefined , prefix : '#' , issue : '11' } ,
29
+ { raw : '#15' , slug : undefined , prefix : '#' , issue : '15' } ,
27
30
] ,
28
31
mentions : [ { raw : '@user' , prefix : '@' , user : 'user' } ] ,
29
32
}
@@ -130,7 +133,7 @@ test('Parse Waffle issue', t => {
130
133
test ( 'Parse with default options' , t => {
131
134
t . deepEqual (
132
135
m ( ) (
133
- 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fix o/r#4 #5 o/r#6 implementing #7 https://github.com/o/r/issues/8 implementing https://github.com/o/r/issues/9 Duplicate OF #10 @user'
136
+ 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fix o/r#4 #5 o/r#6 implementing #7 https://github.com/o/r/issues/8 implementing https://github.com/o/r/issues/9 Duplicate OF #10 Fix: #11 @user'
134
137
) ,
135
138
{
136
139
actions : {
@@ -147,6 +150,7 @@ test('Parse with default options', t => {
147
150
prefix : undefined ,
148
151
issue : '9' ,
149
152
} ,
153
+ { raw : 'Fix: #11' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '11' } ,
150
154
] ,
151
155
block : [ ] ,
152
156
require : [ ] ,
@@ -167,17 +171,22 @@ test('Parse with default options', t => {
167
171
test ( 'Parse with custom options' , t => {
168
172
t . deepEqual (
169
173
m ( {
170
- actions : { close : [ 'fix' ] , fix : [ 'fix' ] , duplicate : undefined } ,
174
+ actions : { close : [ 'fix' , 'close' ] , fix : [ 'fix' ] , duplicate : undefined } ,
175
+ delimiters : [ ':' , '*' ] ,
171
176
mentionsPrefixes : '!' ,
172
177
issuePrefixes : [ '#' ] ,
173
178
hosts : [ 'http://host1.com/' , 'http://host2.com' ] ,
174
179
issueURLSegments : [ 'bugs' ] ,
175
180
} ) (
176
- 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fixed o/r#4 #5 o/r#6 fixing #7 http://host1.com/o/r/bugs/8 http://host2.com/o/r/bugs/9 Duplicate OF #10 !user @other'
181
+ 'Fix #1 reSOLved gh-2 CLOSES Gh-3 fixed o/r#4 #5 o/r#6 fixing #7 http://host1.com/o/r/bugs/8 http://host2.com/o/r/bugs/9 Duplicate OF #10 Close:#11 Close* #12 !user @other'
177
182
) ,
178
183
{
179
184
actions : {
180
- close : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
185
+ close : [
186
+ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ,
187
+ { raw : 'Close:#11' , action : 'Close' , slug : undefined , prefix : '#' , issue : '11' } ,
188
+ { raw : 'Close* #12' , action : 'Close' , slug : undefined , prefix : '#' , issue : '12' } ,
189
+ ] ,
181
190
fix : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
182
191
block : [ ] ,
183
192
require : [ ] ,
0 commit comments