@@ -2238,6 +2238,60 @@ var TESTS: Test[] = [
22382238    [ 
22392239      [ null ,  'this is' ] 
22402240    ] 
2241+   ] , 
2242+   /** 
2243+    * Case-sensitive compile tokensToFunction params. 
2244+    */ 
2245+   [ 
2246+     '/:test(abc)' , 
2247+     { 
2248+       sensitive : true 
2249+     } , 
2250+     [ 
2251+       { 
2252+         name : 'test' , 
2253+         prefix : '/' , 
2254+         delimiter : '/' , 
2255+         optional : false , 
2256+         repeat : false , 
2257+         partial : false , 
2258+         asterisk : false , 
2259+         pattern : 'abc' 
2260+       } 
2261+     ] , 
2262+     [ 
2263+       [ '/abc' ,  [ '/abc' ,  'abc' ] ] , 
2264+       [ '/ABC' ,  null ] 
2265+     ] , 
2266+     [ 
2267+       [ {  test : 'abc'  } ,  '/abc' ] , 
2268+       [ {  test : 'ABC'  } ,  null ] 
2269+     ] 
2270+   ] , 
2271+   [ 
2272+     '/:test(abc)' , 
2273+     { 
2274+     } , 
2275+     [ 
2276+       { 
2277+         name : 'test' , 
2278+         prefix : '/' , 
2279+         delimiter : '/' , 
2280+         optional : false , 
2281+         repeat : false , 
2282+         partial : false , 
2283+         asterisk : false , 
2284+         pattern : 'abc' 
2285+       } 
2286+     ] , 
2287+     [ 
2288+       [ '/abc' ,  [ '/abc' ,  'abc' ] ] , 
2289+       [ '/ABC' ,  [ '/ABC' ,  'ABC' ] ] 
2290+     ] , 
2291+     [ 
2292+       [ {  test : 'abc'  } ,  '/abc' ] , 
2293+       [ {  test : 'ABC'  } ,  '/ABC' ] 
2294+     ] 
22412295  ] 
22422296] 
22432297
@@ -2322,7 +2376,7 @@ describe('path-to-regexp', function () {
23222376      } ) 
23232377
23242378      describe ( util . inspect ( path ) ,  function  ( )  { 
2325-         var  re  =  pathToRegexp ( path ,  opts ) 
2379+         var  re  =  pathToRegexp ( path   as   string ,  opts ) 
23262380
23272381        // Parsing and compiling is only supported with string input. 
23282382        if  ( typeof  path  ===  'string' )  { 
@@ -2331,7 +2385,7 @@ describe('path-to-regexp', function () {
23312385          } ) 
23322386
23332387          describe ( 'compile' ,  function  ( )  { 
2334-             var  toPath  =  pathToRegexp . compile ( path ) 
2388+             var  toPath  =  pathToRegexp . compile ( path   as   string ,   opts ) 
23352389
23362390            compileCases . forEach ( function  ( io )  { 
23372391              var  input  =  io [ 0 ] 
0 commit comments