@@ -46,15 +46,15 @@ describe('getTerms', () => {
4646 expect ( result ) . not . toContain ( 'coffee' ) ;
4747 expect ( result ) . toContain ( 'mocha' ) ;
4848 expect (
49- result . some ( ( term ) => Array . isArray ( term ) && term [ 1 ] === 'Node.js' )
49+ result . some ( ( term ) => Array . isArray ( term ) && term [ 1 ] === 'Node.js' ) ,
5050 ) . toBe ( true ) ;
5151 } ) ;
5252
5353 test ( 'should remove the excluded terms (defined as Array)' , ( ) => {
5454 const result = getTerms ( true , [ ] , [ 'Node[ .]?js' ] ) ;
5555 expect ( result ) . toBeTruthy ( ) ;
5656 expect (
57- result . some ( ( term ) => Array . isArray ( term ) && term [ 1 ] === 'Node.js' )
57+ result . some ( ( term ) => Array . isArray ( term ) && term [ 1 ] === 'Node.js' ) ,
5858 ) . toBe ( false ) ;
5959 } ) ;
6060} ) ;
@@ -71,66 +71,66 @@ describe('getMultipleWordRegExp', () => {
7171
7272 test ( 'should match a pattern as a full word' , ( ) => {
7373 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
74- 'My JavaScript is good'
74+ 'My JavaScript is good' ,
7575 ) ;
7676 expect ( result ?. [ 0 ] ) . toBe ( 'JavaScript' ) ;
7777 } ) ;
7878
7979 test ( 'should not match a pattern in the middle of a word' , ( ) => {
8080 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
81- 'Foo superwebpacky bar'
81+ 'Foo superwebpacky bar' ,
8282 ) ;
8383 expect ( result ) . toBeFalsy ( ) ;
8484 } ) ;
8585
8686 test ( 'should not match a pattern at the beginning of a string' , ( ) => {
8787 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
88- 'webpack bar'
88+ 'webpack bar' ,
8989 ) ;
9090 expect ( result ) . toBeTruthy ( ) ;
9191 expect ( result ?. [ 0 ] ) . toBe ( 'webpack' ) ;
9292 } ) ;
9393
9494 test ( 'should not match a pattern at the end of a string' , ( ) => {
9595 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
96- 'foo webpack'
96+ 'foo webpack' ,
9797 ) ;
9898 expect ( result ) . toBeTruthy ( ) ;
9999 expect ( result ?. [ 0 ] ) . toBe ( 'webpack' ) ;
100100 } ) ;
101101
102102 test ( 'should not match a pattern at the beginning of a word with a hyphen' , ( ) => {
103103 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
104- 'Foo webpack-ish bar'
104+ 'Foo webpack-ish bar' ,
105105 ) ;
106106 expect ( result ) . toBeFalsy ( ) ;
107107 } ) ;
108108
109109 test ( 'should not match a pattern in at the end of a word with a hyphen' , ( ) => {
110110 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
111- 'Foo uber-webpack bar'
111+ 'Foo uber-webpack bar' ,
112112 ) ;
113113 expect ( result ) . toBeFalsy ( ) ;
114114 } ) ;
115115
116116 test ( 'should not match a pattern in at the middle of a word with hyphens' , ( ) => {
117117 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
118- 'Foo uber-webpack-ish bar'
118+ 'Foo uber-webpack-ish bar' ,
119119 ) ;
120120 expect ( result ) . toBeFalsy ( ) ;
121121 } ) ;
122122
123123 test ( 'should match a pattern at the end of a sentence' , ( ) => {
124124 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
125- 'My javascript.'
125+ 'My javascript.' ,
126126 ) ;
127127 expect ( result ) . toBeTruthy ( ) ;
128128 expect ( result ?. [ 0 ] ) . toBe ( 'javascript' ) ;
129129 } ) ;
130130
131131 test ( 'should match a pattern at the end of a sentence in the middle of a string' , ( ) => {
132132 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
133- 'My javascript. My webpack.'
133+ 'My javascript. My webpack.' ,
134134 ) ;
135135 expect ( result ) . toBeTruthy ( ) ;
136136 expect ( result ?. [ 0 ] ) . toBe ( 'javascript' ) ;
@@ -151,21 +151,21 @@ describe('getMultipleWordRegExp', () => {
151151 [ 'Bad Javascript?' ] ,
152152 ] ) ( 'should match a pattern regardless of punctuation: %s' , ( string ) => {
153153 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
154- string
154+ string ,
155155 ) ;
156156 expect ( result ) . toBeTruthy ( ) ;
157157 } ) ;
158158
159159 test ( 'should not match a pattern in as a part of a file name' , ( ) => {
160160 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
161- 'javascript.md'
161+ 'javascript.md' ,
162162 ) ;
163163 expect ( result ) . toBeFalsy ( ) ;
164164 } ) ;
165165
166166 test ( 'should match a pattern regardless of its case' , ( ) => {
167167 const result = new RegExp ( getMultipleWordRegExp ( variants ) , 'igm' ) . exec (
168- 'Javascript is good'
168+ 'Javascript is good' ,
169169 ) ;
170170 expect ( result ) . toBeTruthy ( ) ;
171171 expect ( result ?. [ 0 ] ) . toBe ( 'Javascript' ) ;
@@ -219,23 +219,23 @@ describe('getAdvancedRegExp', () => {
219219 test ( 'should return regexp as is if it has look behinds' , ( ) => {
220220 const regexp = new RegExp (
221221 getAdvancedRegExp ( String . raw `(?<=(?:\w+[^.?!])? )base64\b` ) ,
222- 'igm'
222+ 'igm' ,
223223 ) ;
224224 expect ( regexp . test ( 'use Base64' ) ) . toBeTruthy ( ) ;
225225 } ) ;
226226
227227 test ( 'should return regexp as is if it has positive look ahead' , ( ) => {
228228 const regexp = new RegExp (
229229 getAdvancedRegExp ( String . raw `base64(?= \w)` ) ,
230- 'igm'
230+ 'igm' ,
231231 ) ;
232232 expect ( regexp . test ( 'Base64 foo' ) ) . toBeTruthy ( ) ;
233233 } ) ;
234234
235235 test ( 'should return regexp as is if it has negative look ahead' , ( ) => {
236236 const regexp = new RegExp (
237237 getAdvancedRegExp ( String . raw `base64(?! \w)` ) ,
238- 'igm'
238+ 'igm' ,
239239 ) ;
240240 expect ( regexp . test ( 'Base64' ) ) . toBeTruthy ( ) ;
241241 expect ( regexp . test ( 'Base64 foo' ) ) . toBeFalsy ( ) ;
@@ -244,7 +244,7 @@ describe('getAdvancedRegExp', () => {
244244 test ( 'should not match words inside filenames' , ( ) => {
245245 const regexp = new RegExp (
246246 getAdvancedRegExp ( String . raw `(?<![\.-])css\b` ) ,
247- 'igm'
247+ 'igm' ,
248248 ) ;
249249 expect ( regexp . test ( 'typings.for.css.modules.loader' ) ) . toBeFalsy ( ) ;
250250 expect ( regexp . test ( 'typings-for-css-modules-loader' ) ) . toBeFalsy ( ) ;
@@ -258,7 +258,7 @@ describe('getReplacement', () => {
258258 const result = getReplacement (
259259 'JavaScript' ,
260260 [ 'npm' , 'JavaScript' , 'webpack' ] ,
261- 'Javascript'
261+ 'Javascript' ,
262262 ) ;
263263 expect ( result ) . toEqual ( 'JavaScript' ) ;
264264 } ) ;
@@ -420,5 +420,5 @@ tester.run(
420420 ] ,
421421 } ,
422422 ] ,
423- }
423+ } ,
424424) ;
0 commit comments