@@ -89,47 +89,6 @@ test('Parse GitLab issue', t => {
8989 ) ;
9090} ) ;
9191
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-
13392test ( 'Parse with default options' , t => {
13493 t . deepEqual (
13594 m ( ) (
@@ -152,10 +111,6 @@ test('Parse with default options', t => {
152111 } ,
153112 { raw : 'Fix: #11' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '11' } ,
154113 ] ,
155- block : [ ] ,
156- require : [ ] ,
157- parentOf : [ ] ,
158- childOf : [ ] ,
159114 duplicate : [ { raw : 'Duplicate OF #10' , action : 'Duplicate of' , slug : undefined , prefix : '#' , issue : '10' } ] ,
160115 } ,
161116 refs : [
@@ -188,10 +143,6 @@ test('Parse with custom options', t => {
188143 { raw : 'Close* #12' , action : 'Close' , slug : undefined , prefix : '#' , issue : '12' } ,
189144 ] ,
190145 fix : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
191- block : [ ] ,
192- require : [ ] ,
193- parentOf : [ ] ,
194- childOf : [ ] ,
195146 } ,
196147 refs : [
197148 { raw : 'o/r#4' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
@@ -221,10 +172,6 @@ test('Parse with options overrides', t => {
221172 {
222173 actions : {
223174 close : [ { raw : 'Fix #1' , action : 'Fix' , slug : undefined , prefix : '#' , issue : '1' } ] ,
224- block : [ ] ,
225- require : [ ] ,
226- parentOf : [ ] ,
227- childOf : [ ] ,
228175 } ,
229176 refs : [
230177 { raw : 'o/r#4' , slug : 'o/r' , prefix : '#' , issue : '4' } ,
@@ -283,66 +230,6 @@ test('Parse actions.close', t => {
283230 ] ) ;
284231} ) ;
285232
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-
346233test ( 'Parse actions.duplicate' , t => {
347234 t . deepEqual ( m ( 'github' ) ( 'Duplicate of #1, DUPLICATE of #2' ) . actions . duplicate , [
348235 { issue : '1' , action : 'Duplicate of' , slug : undefined , prefix : '#' , raw : 'Duplicate of #1' } ,
@@ -413,7 +300,7 @@ Fix #2
413300
414301test ( 'Empty options' , t => {
415302 t . deepEqual ( m ( { actions : { close : [ ] } , issuePrefixes : [ ] , mentionsPrefixes : [ ] } ) ( 'Fix #1, @user' ) , {
416- actions : { block : [ ] , require : [ ] , parentOf : [ ] , childOf : [ ] , duplicate : [ ] } ,
303+ actions : { duplicate : [ ] } ,
417304 mentions : [ ] ,
418305 refs : [ ] ,
419306 } ) ;
@@ -423,10 +310,6 @@ test('Empty options', t => {
423310 refs : [ ] ,
424311 actions : {
425312 close : [ { issue : '1' , action : 'Fix' , slug : undefined , prefix : '#' , raw : 'Fix #1' } ] ,
426- block : [ ] ,
427- require : [ ] ,
428- parentOf : [ ] ,
429- childOf : [ ] ,
430313 duplicate : [ ] ,
431314 } ,
432315 mentions : [ { raw : '@user' , prefix : '@' , user : 'user' } ] ,
@@ -436,7 +319,7 @@ test('Empty options', t => {
436319
437320test ( 'Empty String' , t => {
438321 const empty = {
439- actions : { close : [ ] , block : [ ] , require : [ ] , parentOf : [ ] , childOf : [ ] , duplicate : [ ] } ,
322+ actions : { close : [ ] , duplicate : [ ] } ,
440323 mentions : [ ] ,
441324 refs : [ ] ,
442325 } ;
@@ -448,7 +331,7 @@ test('Empty String', t => {
448331test ( 'Throw TypeError for invalid options' , t => {
449332 t . throws (
450333 ( ) => 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'"
452335 ) ;
453336 t . throws ( ( ) => m ( [ ] ) , 'The options argument must be a String or an Object' ) ;
454337 t . throws ( ( ) => m ( 1 ) , 'The options argument must be a String or an Object' ) ;
0 commit comments