@@ -7,15 +7,15 @@ describe('getIssueLabels function', () => {
7
7
'Body with labels <!-- AUTO-LABEL:START --> Label1 Label2 <!-- AUTO-LABEL:END -->'
8
8
const labels = [ 'Label1' , 'Label2' ]
9
9
10
- const result = getIssueLabels ( body , labels , false , [ ] , { } )
10
+ const result = getIssueLabels ( body , labels , [ ] , { } )
11
11
12
12
expect ( result ) . toEqual ( [ 'Label1' , 'Label2' ] )
13
13
} )
14
14
15
15
test ( 'should handle no labels in body' , ( ) => {
16
16
const body = 'No labels in this body'
17
17
const labels = [ 'Label1' , 'Label2' ]
18
- const result = getIssueLabels ( body , labels , false , [ ] , { } )
18
+ const result = getIssueLabels ( body , labels , [ ] , { } )
19
19
20
20
expect ( result ) . toEqual ( [ ] )
21
21
} )
@@ -25,28 +25,17 @@ describe('getIssueLabels function', () => {
25
25
const labels = [ 'Label1' , 'Label2' ]
26
26
const defaultLabels = [ 'DefaultLabel1' , 'DefaultLabel2' ]
27
27
28
- const result = getIssueLabels ( body , labels , false , defaultLabels , { } )
28
+ const result = getIssueLabels ( body , labels , defaultLabels , { } )
29
29
30
30
expect ( result ) . toEqual ( [ 'DefaultLabel1' , 'DefaultLabel2' ] )
31
31
} )
32
32
33
- test ( 'should not add labels inside the comments section' , ( ) => {
34
- const body =
35
- 'Body with labels: Label1 <!-- the label Label2 is mentioned in the body, but its commented and shouldn`t be tracked -->'
36
- const labels = [ 'Label1' , 'Label2' ]
37
-
38
- const result = getIssueLabels ( body , labels , true , [ ] , { } )
39
-
40
- expect ( result ) . toEqual ( [ 'Label1' ] )
41
- } )
42
-
43
33
test ( 'should check if there is any synonym for the labels available' , ( ) => {
44
- const body =
45
- 'Body with labels: Synonym1 <!-- the label Synonym2 is mentioned in the body, but its commented and shouldn`t be tracked -->'
34
+ const body = 'Body with labels: Synonym1'
46
35
const labels = [ 'Label1' , 'Label2' ]
47
36
const labelsSynonyms = { Label1 : [ 'Synonym1' ] , Label2 : [ 'Synonym2' ] }
48
37
49
- const result = getIssueLabels ( body , labels , true , [ ] , labelsSynonyms )
38
+ const result = getIssueLabels ( body , labels , [ ] , labelsSynonyms )
50
39
51
40
expect ( result ) . toEqual ( [ 'Label1' ] )
52
41
} )
0 commit comments