@@ -89,47 +89,6 @@ test('Parse GitLab issue', t => {
89
89
) ;
90
90
} ) ;
91
91
92
- test ( 'Parse Waffle issue' , t => {
93
- t . deepEqual (
94
- m ( 'Waffle' ) (
95
- '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 BloCks #13 Requires o/r#14 parent of https://github.com/o/r/issues/15 child to Gh-16'
96
- ) ,
97
- {
98
- actions : {
99
- close : [
100
- { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ,
101
- { raw : 'reSOLved gh-2' , action : 'Resolved' , slug : undefined , prefix : 'gh-' , issue : '2' } ,
102
- { raw : 'CLOSES Gh-3' , action : 'Closes' , slug : undefined , prefix : 'Gh-' , issue : '3' } ,
103
- { raw : 'fix o/r#4' , action : 'Fix' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
104
- { raw : 'fix https://github.com/o/r/issues/7' , action : 'Fix' , slug : 'o/r' , prefix : undefined , issue : '7' } ,
105
- { raw : 'fix https://github.com/o/r/pull/9' , action : 'Fix' , slug : 'o/r' , prefix : undefined , issue : '9' } ,
106
- ] ,
107
- block : [ { raw : 'BloCks #13' , action : 'Blocks' , slug : undefined , prefix : '#' , issue : '13' } ] ,
108
- require : [ { raw : 'Requires o/r#14' , action : 'Requires' , slug : 'o/r' , prefix : '#' , issue : '14' } ] ,
109
- parentOf : [
110
- {
111
- raw : 'parent of https://github.com/o/r/issues/15' ,
112
- action : 'Parent of' ,
113
- slug : 'o/r' ,
114
- prefix : undefined ,
115
- issue : '15' ,
116
- } ,
117
- ] ,
118
- childOf : [ { raw : 'child to Gh-16' , action : 'Child to' , slug : undefined , prefix : 'Gh-' , issue : '16' } ] ,
119
- duplicate : [ { raw : 'Duplicate OF #12' , action : 'Duplicate of' , slug : undefined , prefix : '#' , issue : '12' } ] ,
120
- } ,
121
- refs : [
122
- { raw : '#5' , slug : undefined , prefix : '#' , issue : '5' } ,
123
- { raw : 'o/r#6' , slug : 'o/r' , prefix : '#' , issue : '6' } ,
124
- { raw : 'https://github.com/o/r/issues/8' , slug : 'o/r' , prefix : undefined , issue : '8' } ,
125
- { raw : 'https://github.com/o/r/pull/10' , slug : 'o/r' , prefix : undefined , issue : '10' } ,
126
- { raw : '#11' , slug : undefined , prefix : '#' , issue : '11' } ,
127
- ] ,
128
- mentions : [ { raw : '@user' , prefix : '@' , user : 'user' } ] ,
129
- }
130
- ) ;
131
- } ) ;
132
-
133
92
test ( 'Parse with default options' , t => {
134
93
t . deepEqual (
135
94
m ( ) (
@@ -152,10 +111,6 @@ test('Parse with default options', t => {
152
111
} ,
153
112
{ raw : 'Fix: #11' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '11' } ,
154
113
] ,
155
- block : [ ] ,
156
- require : [ ] ,
157
- parentOf : [ ] ,
158
- childOf : [ ] ,
159
114
duplicate : [ { raw : 'Duplicate OF #10' , action : 'Duplicate of' , slug : undefined , prefix : '#' , issue : '10' } ] ,
160
115
} ,
161
116
refs : [
@@ -188,10 +143,6 @@ test('Parse with custom options', t => {
188
143
{ raw : 'Close* #12' , action : 'Close' , slug : undefined , prefix : '#' , issue : '12' } ,
189
144
] ,
190
145
fix : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
191
- block : [ ] ,
192
- require : [ ] ,
193
- parentOf : [ ] ,
194
- childOf : [ ] ,
195
146
} ,
196
147
refs : [
197
148
{ raw : 'o/r#4' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
@@ -221,10 +172,6 @@ test('Parse with options overrides', t => {
221
172
{
222
173
actions : {
223
174
close : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
224
- block : [ ] ,
225
- require : [ ] ,
226
- parentOf : [ ] ,
227
- childOf : [ ] ,
228
175
} ,
229
176
refs : [
230
177
{ raw : 'o/r#4' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
@@ -283,66 +230,6 @@ test('Parse actions.close', t => {
283
230
] ) ;
284
231
} ) ;
285
232
286
- test ( 'Parse actions.block' , t => {
287
- t . deepEqual ( m ( 'waffle' ) ( 'Blocks #1, Block #2' ) . actions . block , [
288
- { issue : '1' , action : 'Blocks' , slug : undefined , prefix : '#' , raw : 'Blocks #1' } ,
289
- { issue : '2' , action : 'Block' , slug : undefined , prefix : '#' , raw : 'Block #2' } ,
290
- ] ) ;
291
- t . deepEqual ( m ( 'waffle' ) ( 'Blocks #1,Block #2' ) . actions . block , [
292
- { issue : '1' , action : 'Blocks' , slug : undefined , prefix : '#' , raw : 'Blocks #1' } ,
293
- { issue : '2' , action : 'Block' , slug : undefined , prefix : '#' , raw : 'Block #2' } ,
294
- ] ) ;
295
- t . deepEqual ( m ( 'waffle' ) ( 'blocks #1, BLOCK #2' ) . actions . block , [
296
- { issue : '1' , action : 'Blocks' , slug : undefined , prefix : '#' , raw : 'blocks #1' } ,
297
- { issue : '2' , action : 'Block' , slug : undefined , prefix : '#' , raw : 'BLOCK #2' } ,
298
- ] ) ;
299
- } ) ;
300
-
301
- test ( 'Parse actions.require' , t => {
302
- t . deepEqual ( m ( 'waffle' ) ( 'Requires #1, Require #2' ) . actions . require , [
303
- { issue : '1' , action : 'Requires' , slug : undefined , prefix : '#' , raw : 'Requires #1' } ,
304
- { issue : '2' , action : 'Require' , slug : undefined , prefix : '#' , raw : 'Require #2' } ,
305
- ] ) ;
306
- t . deepEqual ( m ( 'waffle' ) ( 'Requires #1,Require #2' ) . actions . require , [
307
- { issue : '1' , action : 'Requires' , slug : undefined , prefix : '#' , raw : 'Requires #1' } ,
308
- { issue : '2' , action : 'Require' , slug : undefined , prefix : '#' , raw : 'Require #2' } ,
309
- ] ) ;
310
- t . deepEqual ( m ( 'waffle' ) ( 'requires #1, REQUIRE #2' ) . actions . require , [
311
- { issue : '1' , action : 'Requires' , slug : undefined , prefix : '#' , raw : 'requires #1' } ,
312
- { issue : '2' , action : 'Require' , slug : undefined , prefix : '#' , raw : 'REQUIRE #2' } ,
313
- ] ) ;
314
- } ) ;
315
-
316
- test ( 'Parse actions.parentOf' , t => {
317
- t . deepEqual ( m ( 'waffle' ) ( 'Parent of #1, Parent to #2' ) . actions . parentOf , [
318
- { issue : '1' , action : 'Parent of' , slug : undefined , prefix : '#' , raw : 'Parent of #1' } ,
319
- { issue : '2' , action : 'Parent to' , slug : undefined , prefix : '#' , raw : 'Parent to #2' } ,
320
- ] ) ;
321
- t . deepEqual ( m ( 'waffle' ) ( 'Parent of #1,Parent to #2' ) . actions . parentOf , [
322
- { issue : '1' , action : 'Parent of' , slug : undefined , prefix : '#' , raw : 'Parent of #1' } ,
323
- { issue : '2' , action : 'Parent to' , slug : undefined , prefix : '#' , raw : 'Parent to #2' } ,
324
- ] ) ;
325
- t . deepEqual ( m ( 'waffle' ) ( 'parent of #1, PARENT TO #2' ) . actions . parentOf , [
326
- { issue : '1' , action : 'Parent of' , slug : undefined , prefix : '#' , raw : 'parent of #1' } ,
327
- { issue : '2' , action : 'Parent to' , slug : undefined , prefix : '#' , raw : 'PARENT TO #2' } ,
328
- ] ) ;
329
- } ) ;
330
-
331
- test ( 'Parse actions.childOf' , t => {
332
- t . deepEqual ( m ( 'waffle' ) ( 'Child of #1, Child to #2' ) . actions . childOf , [
333
- { issue : '1' , action : 'Child of' , slug : undefined , prefix : '#' , raw : 'Child of #1' } ,
334
- { issue : '2' , action : 'Child to' , slug : undefined , prefix : '#' , raw : 'Child to #2' } ,
335
- ] ) ;
336
- t . deepEqual ( m ( 'waffle' ) ( 'Child of #1,Child to #2' ) . actions . childOf , [
337
- { issue : '1' , action : 'Child of' , slug : undefined , prefix : '#' , raw : 'Child of #1' } ,
338
- { issue : '2' , action : 'Child to' , slug : undefined , prefix : '#' , raw : 'Child to #2' } ,
339
- ] ) ;
340
- t . deepEqual ( m ( 'waffle' ) ( 'child of #1, CHILD TO #2' ) . actions . childOf , [
341
- { issue : '1' , action : 'Child of' , slug : undefined , prefix : '#' , raw : 'child of #1' } ,
342
- { issue : '2' , action : 'Child to' , slug : undefined , prefix : '#' , raw : 'CHILD TO #2' } ,
343
- ] ) ;
344
- } ) ;
345
-
346
233
test ( 'Parse actions.duplicate' , t => {
347
234
t . deepEqual ( m ( 'github' ) ( 'Duplicate of #1, DUPLICATE of #2' ) . actions . duplicate , [
348
235
{ issue : '1' , action : 'Duplicate of' , slug : undefined , prefix : '#' , raw : 'Duplicate of #1' } ,
@@ -413,7 +300,7 @@ Fix #2
413
300
414
301
test ( 'Empty options' , t => {
415
302
t . deepEqual ( m ( { actions : { close : [ ] } , issuePrefixes : [ ] , mentionsPrefixes : [ ] } ) ( 'Fix #1, @user' ) , {
416
- actions : { block : [ ] , require : [ ] , parentOf : [ ] , childOf : [ ] , duplicate : [ ] } ,
303
+ actions : { duplicate : [ ] } ,
417
304
mentions : [ ] ,
418
305
refs : [ ] ,
419
306
} ) ;
@@ -423,10 +310,6 @@ test('Empty options', t => {
423
310
refs : [ ] ,
424
311
actions : {
425
312
close : [ { issue : '1' , action : 'Fix' , slug : undefined , prefix : '#' , raw : 'Fix #1' } ] ,
426
- block : [ ] ,
427
- require : [ ] ,
428
- parentOf : [ ] ,
429
- childOf : [ ] ,
430
313
duplicate : [ ] ,
431
314
} ,
432
315
mentions : [ { raw : '@user' , prefix : '@' , user : 'user' } ] ,
@@ -436,7 +319,7 @@ test('Empty options', t => {
436
319
437
320
test ( 'Empty String' , t => {
438
321
const empty = {
439
- actions : { close : [ ] , block : [ ] , require : [ ] , parentOf : [ ] , childOf : [ ] , duplicate : [ ] } ,
322
+ actions : { close : [ ] , duplicate : [ ] } ,
440
323
mentions : [ ] ,
441
324
refs : [ ] ,
442
325
} ;
@@ -448,7 +331,7 @@ test('Empty String', t => {
448
331
test ( 'Throw TypeError for invalid options' , t => {
449
332
t . throws (
450
333
( ) => m ( 'missing-option' ) ,
451
- "The supported configuration are [github, bitbucket, gitlab, waffle, default], got 'missing-option'"
334
+ "The supported configuration are [github, bitbucket, gitlab, default], got 'missing-option'"
452
335
) ;
453
336
t . throws ( ( ) => m ( [ ] ) , 'The options argument must be a String or an Object' ) ;
454
337
t . throws ( ( ) => m ( 1 ) , 'The options argument must be a String or an Object' ) ;
0 commit comments