File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,51 @@ test('throws for rule with out of range condition', async t => {
134
134
error . message . indexOf ( 'header-max-length must be "always" or "never"' ) > - 1
135
135
) ;
136
136
} ) ;
137
+
138
+ test ( 'succeds for issue' , async t => {
139
+ const report = await lint ( 'somehting #1' , {
140
+ 'references-empty' : [ 2 , 'never' ]
141
+ } ) ;
142
+
143
+ t . true ( report . valid ) ;
144
+ } ) ;
145
+
146
+ test ( 'fails for issue' , async t => {
147
+ const report = await lint ( 'somehting #1' , {
148
+ 'references-empty' : [ 2 , 'always' ]
149
+ } ) ;
150
+
151
+ t . false ( report . valid ) ;
152
+ } ) ;
153
+
154
+ test ( 'succeds for custom issue prefix' , async t => {
155
+ const report = await lint (
156
+ 'somehting REF-1' ,
157
+ {
158
+ 'references-empty' : [ 2 , 'never' ]
159
+ } ,
160
+ {
161
+ parserOpts : {
162
+ issuePrefixes : [ 'REF-' ]
163
+ }
164
+ }
165
+ ) ;
166
+
167
+ t . true ( report . valid ) ;
168
+ } ) ;
169
+
170
+ test ( 'fails for custom issue prefix' , async t => {
171
+ const report = await lint (
172
+ 'somehting #1' ,
173
+ {
174
+ 'references-empty' : [ 2 , 'never' ]
175
+ } ,
176
+ {
177
+ parserOpts : {
178
+ issuePrefixes : [ 'REF-' ]
179
+ }
180
+ }
181
+ ) ;
182
+
183
+ t . false ( report . valid ) ;
184
+ } ) ;
You can’t perform that action at this time.
0 commit comments