@@ -1384,20 +1384,18 @@ describe('expand', () => {
13841384 'Halfwidth_and_Fullwidth_Forms' ,
13851385 'Specials' ,
13861386 ] . forEach ( ( unicodeBlock ) => {
1387- function testUnicodeBlock ( _ : string , input : string ) {
1388- const result = expandAll ( input ) ;
1389- expect ( result ) . toHaveLength ( 1 ) ;
1390- expect ( result [ 0 ] ) . toMatch ( / ^ p { / ) ;
1391- }
1392-
13931387 it . each ( [
13941388 [ '' , `\p{${ unicodeBlock } }` ] ,
13951389 [ '' , `\p{Is${ unicodeBlock } }` ] ,
13961390 [ '' , `\p{In${ unicodeBlock } }` ] ,
13971391 [ 'lowercase' , `\p{In${ unicodeBlock . toLowerCase ( ) } }` ] ,
13981392 ] ) (
13991393 `does not recognize RegEx syntax: ${ unicodeBlock } Unicode block %s /%s/` ,
1400- testUnicodeBlock
1394+ ( _ , input ) => {
1395+ const result = expandAll ( input ) ;
1396+ expect ( result ) . toHaveLength ( 1 ) ;
1397+ expect ( result [ 0 ] ) . toMatch ( / ^ p { / ) ;
1398+ }
14011399 ) ;
14021400
14031401 if ( unicodeBlock . includes ( '_' ) ) {
@@ -1407,7 +1405,11 @@ describe('expand', () => {
14071405 [ 'spaces for underscores' , `\p{${ unicodeBlock . replace ( '_' , ' ' ) } }` ] ,
14081406 ] ) (
14091407 `does not recognize RegEx syntax: ${ unicodeBlock } Unicode block %s /%s/` ,
1410- testUnicodeBlock
1408+ ( _ , input ) => {
1409+ const result = expandAll ( input ) ;
1410+ expect ( result ) . toHaveLength ( 1 ) ;
1411+ expect ( result [ 0 ] ) . toMatch ( / ^ p { / ) ;
1412+ }
14111413 ) ;
14121414 }
14131415
@@ -1418,7 +1420,11 @@ describe('expand', () => {
14181420 [ 'spaces for hyphens' , `\p{${ unicodeBlock . replace ( '-' , ' ' ) } }` ] ,
14191421 ] ) (
14201422 `does not recognize RegEx syntax: ${ unicodeBlock } Unicode block %s /%s/` ,
1421- testUnicodeBlock
1423+ ( _ , input ) => {
1424+ const result = expandAll ( input ) ;
1425+ expect ( result ) . toHaveLength ( 1 ) ;
1426+ expect ( result [ 0 ] ) . toMatch ( / ^ p { / ) ;
1427+ }
14221428 ) ;
14231429 }
14241430 } ) ;
0 commit comments