@@ -8,9 +8,9 @@ const validMatcher = {
88 regexp : "^([^:]+):([^:]+):([^:]+)$" ,
99 message : 1 ,
1010 file : 2 ,
11- line : 3
12- }
13- ]
11+ line : 3 ,
12+ } ,
13+ ] ,
1414} ;
1515
1616const eslintSingleMatcher = {
@@ -24,9 +24,9 @@ const eslintSingleMatcher = {
2424 column : 3 ,
2525 severity : 4 ,
2626 message : 5 ,
27- code : 6
28- }
29- ]
27+ code : 6 ,
28+ } ,
29+ ] ,
3030} ;
3131
3232const eslintLoopMatcher = {
@@ -35,7 +35,7 @@ const eslintLoopMatcher = {
3535 {
3636 // Matches the 1st line in the output
3737 regexp : "^([^\\s].*)$" ,
38- file : 1
38+ file : 1 ,
3939 } ,
4040 {
4141 // Matches the 2nd and 3rd line in the output
@@ -46,9 +46,9 @@ const eslintLoopMatcher = {
4646 severity : 3 ,
4747 message : 4 ,
4848 code : 5 ,
49- loop : true
50- }
51- ]
49+ loop : true ,
50+ } ,
51+ ] ,
5252} ;
5353
5454const loopMatcherWithDefaultSeverity = {
@@ -58,7 +58,7 @@ const loopMatcherWithDefaultSeverity = {
5858 {
5959 // Matches the 1st line in the output
6060 regexp : "^([^\\s].*)$" ,
61- file : 1
61+ file : 1 ,
6262 } ,
6363 {
6464 // Matches the 2nd and 3rd line in the output
@@ -68,9 +68,9 @@ const loopMatcherWithDefaultSeverity = {
6868 column : 2 ,
6969 message : 3 ,
7070 code : 4 ,
71- loop : true
72- }
73- ]
71+ loop : true ,
72+ } ,
73+ ] ,
7474} ;
7575
7676test ( "throws an error if the matcher is missing" , ( ) => {
@@ -80,15 +80,15 @@ test("throws an error if the matcher is missing", () => {
8080
8181test ( "throws an error if the matcher is invalid (no owner)" , ( ) => {
8282 const m = {
83- pattern : [ ]
83+ pattern : [ ] ,
8484 } ;
8585 actual = ( ) => matcher ( m , "error::Something went wrong" ) ;
8686 expect ( actual ) . toThrow ( "No matcher.owner provided" ) ;
8787} ) ;
8888
8989test ( "throws an error if the matcher is invalid (no pattern)" , ( ) => {
9090 const m = {
91- owner : "test"
91+ owner : "test" ,
9292 } ;
9393 actual = ( ) => matcher ( m , "error::Something went wrong" ) ;
9494 expect ( actual ) . toThrow ( "No matcher.pattern provided" ) ;
@@ -97,7 +97,7 @@ test("throws an error if the matcher is invalid (no pattern)", () => {
9797test ( "throws an error if the matcher is invalid (empty pattern)" , ( ) => {
9898 const m = {
9999 owner : "test" ,
100- pattern : [ ]
100+ pattern : [ ] ,
101101 } ;
102102 actual = ( ) => matcher ( m , "error::Something went wrong" ) ;
103103 expect ( actual ) . toThrow (
@@ -108,7 +108,7 @@ test("throws an error if the matcher is invalid (empty pattern)", () => {
108108test ( "throws an error if the matcher is invalid (invalid pattern)" , ( ) => {
109109 const m = {
110110 owner : "test" ,
111- pattern : { invalid : true }
111+ pattern : { invalid : true } ,
112112 } ;
113113 actual = ( ) => matcher ( m , "error::Something went wrong" ) ;
114114 expect ( actual ) . toThrow (
@@ -137,8 +137,8 @@ test("single line matcher, does match", () => {
137137 column : "11" ,
138138 severity : "Error" ,
139139 message : "'myVar' is defined but never used." ,
140- code : "no-unused-vars"
141- }
140+ code : "no-unused-vars" ,
141+ } ,
142142 ] ) ;
143143} ) ;
144144
@@ -161,32 +161,32 @@ foo.js
161161 column : "0" ,
162162 severity : "error" ,
163163 message : 'Missing "use strict" statement' ,
164- code : "strict"
164+ code : "strict" ,
165165 } ,
166166 {
167167 file : "test.js" ,
168168 line : "5" ,
169169 column : "10" ,
170170 severity : "error" ,
171171 message : "'addOne' is defined but never used" ,
172- code : "no-unused-vars"
172+ code : "no-unused-vars" ,
173173 } ,
174174 {
175175 file : "foo.js" ,
176176 line : "36" ,
177177 column : "10" ,
178178 severity : "error" ,
179179 message : "Expected parentheses around arrow function argument" ,
180- code : "arrow-parens"
180+ code : "arrow-parens" ,
181181 } ,
182182 {
183183 file : "foo.js" ,
184184 line : "37" ,
185185 column : "13" ,
186186 severity : "error" ,
187187 message : "Expected parentheses around arrow function argument" ,
188- code : "arrow-parens"
189- }
188+ code : "arrow-parens" ,
189+ } ,
190190 ] ) ;
191191} ) ;
192192
@@ -209,32 +209,32 @@ foo.js
209209 column : "0" ,
210210 severity : "error" ,
211211 message : 'Missing "use strict" statement' ,
212- code : "strict"
212+ code : "strict" ,
213213 } ,
214214 {
215215 file : "test.js" ,
216216 line : "5" ,
217217 column : "10" ,
218218 severity : "error" ,
219219 message : "'addOne' is defined but never used" ,
220- code : "no-unused-vars"
220+ code : "no-unused-vars" ,
221221 } ,
222222 {
223223 file : "foo.js" ,
224224 line : "36" ,
225225 column : "10" ,
226226 severity : "error" ,
227227 message : "Expected parentheses around arrow function argument" ,
228- code : "arrow-parens"
228+ code : "arrow-parens" ,
229229 } ,
230230 {
231231 file : "foo.js" ,
232232 line : "37" ,
233233 column : "13" ,
234234 severity : "error" ,
235235 message : "Expected parentheses around arrow function argument" ,
236- code : "arrow-parens"
237- }
236+ code : "arrow-parens" ,
237+ } ,
238238 ] ) ;
239239} ) ;
240240
@@ -246,8 +246,8 @@ test("uses default severity", () => {
246246 file : "/path/to/file.js" ,
247247 line : "12" ,
248248 severity : "Error" ,
249- message : "Some Message"
250- }
249+ message : "Some Message" ,
250+ } ,
251251 ] ) ;
252252} ) ;
253253
@@ -262,18 +262,18 @@ test("uses overridden severity", () => {
262262 severity : 1 ,
263263 message : 2 ,
264264 file : 3 ,
265- line : 4
266- }
267- ]
265+ line : 4 ,
266+ } ,
267+ ] ,
268268 } ;
269269 actual = matcher ( warningMatcher , input ) ;
270270 expect ( actual ) . toEqual ( [
271271 {
272272 file : "/path/to/file.js" ,
273273 line : "12" ,
274274 severity : "Warning" ,
275- message : "Some Message"
276- }
275+ message : "Some Message" ,
276+ } ,
277277 ] ) ;
278278} ) ;
279279
@@ -287,9 +287,9 @@ test("pattern index provided that doesn't match a capture group", () => {
287287 message : 1 ,
288288 file : 2 ,
289289 line : 3 ,
290- code : 4
291- }
292- ]
290+ code : 4 ,
291+ } ,
292+ ] ,
293293 } ;
294294 actual = ( ) => matcher ( invalidOffsetMatcher , input ) ;
295295 expect ( actual ) . toThrow (
@@ -304,9 +304,9 @@ test("pattern index provided that matches group 0", () => {
304304 pattern : [
305305 {
306306 regexp : "^([^:]+):([^:]+):([^:]+)$" ,
307- message : 0
308- }
309- ]
307+ message : 0 ,
308+ } ,
309+ ] ,
310310 } ;
311311 actual = ( ) => matcher ( invalidOffsetMatcher , input ) ;
312312 expect ( actual ) . toThrow (
@@ -320,13 +320,13 @@ test("unsupported pattern configuration", () => {
320320 pattern : [
321321 {
322322 regexp : "^([^:]+)" ,
323- message : 1
323+ message : 1 ,
324324 } ,
325325 {
326326 regexp : '^([^"]+)' ,
327- message : 1
328- }
329- ]
327+ message : 1 ,
328+ } ,
329+ ] ,
330330 } ;
331331 actual = ( ) => matcher ( multipleNoLoopMatcher , "Test" ) ;
332332 expect ( actual ) . toThrow (
0 commit comments