@@ -15,12 +15,14 @@ describe('createRouterUtils', () => {
1515 client . key . pong = vi . fn ( )
1616
1717 it ( 'works' , ( ) => {
18- const utils = createRouterUtils ( client , [ '__base__' ] ) as any
18+ const utils = createRouterUtils ( client , {
19+ path : [ '__base__' ] ,
20+ } ) as any
1921
2022 expect ( generalUtilsSpy ) . toHaveBeenCalledTimes ( 1 )
2123 expect ( generalUtilsSpy ) . toHaveBeenCalledWith ( [ '__base__' ] )
2224 expect ( procedureUtilsSpy ) . toHaveBeenCalledTimes ( 1 )
23- expect ( procedureUtilsSpy ) . toHaveBeenCalledWith ( client , [ '__base__' ] )
25+ expect ( procedureUtilsSpy ) . toHaveBeenCalledWith ( client , { path : [ '__base__' ] } )
2426
2527 expect ( utils . key ( ) ) . toEqual ( generalUtilsSpy . mock . results [ 0 ] ! . value . key ( ) )
2628 expect ( utils . queryOptions ( ) . queryKey ) . toEqual ( procedureUtilsSpy . mock . results [ 0 ] ! . value . queryOptions ( ) . queryKey )
@@ -31,7 +33,7 @@ describe('createRouterUtils', () => {
3133 expect ( generalUtilsSpy ) . toHaveBeenCalledTimes ( 1 )
3234 expect ( generalUtilsSpy ) . toHaveBeenCalledWith ( [ '__base__' , 'key' ] )
3335 expect ( procedureUtilsSpy ) . toHaveBeenCalledTimes ( 1 )
34- expect ( procedureUtilsSpy ) . toHaveBeenCalledWith ( client . key , [ '__base__' , 'key' ] )
36+ expect ( procedureUtilsSpy ) . toHaveBeenCalledWith ( client . key , { path : [ '__base__' , 'key' ] } )
3537
3638 expect ( keyUtils . key ( ) ) . toEqual ( generalUtilsSpy . mock . results [ 0 ] ! . value . key ( ) )
3739 expect ( keyUtils . queryOptions ( ) . queryKey ) . toEqual ( procedureUtilsSpy . mock . results [ 0 ] ! . value . queryOptions ( ) . queryKey )
@@ -44,15 +46,17 @@ describe('createRouterUtils', () => {
4446 expect ( generalUtilsSpy ) . toHaveBeenNthCalledWith ( 2 , [ '__base__' , 'key' , 'pong' ] )
4547
4648 expect ( procedureUtilsSpy ) . toHaveBeenCalledTimes ( 2 )
47- expect ( procedureUtilsSpy ) . toHaveBeenNthCalledWith ( 1 , client . key , [ '__base__' , 'key' ] )
48- expect ( procedureUtilsSpy ) . toHaveBeenNthCalledWith ( 2 , client . key . pong , [ '__base__' , 'key' , 'pong' ] )
49+ expect ( procedureUtilsSpy ) . toHaveBeenNthCalledWith ( 1 , client . key , { path : [ '__base__' , 'key' ] } )
50+ expect ( procedureUtilsSpy ) . toHaveBeenNthCalledWith ( 2 , client . key . pong , { path : [ '__base__' , 'key' , 'pong' ] } )
4951
5052 expect ( pongUtils . key ( ) ) . toEqual ( generalUtilsSpy . mock . results [ 1 ] ! . value . key ( ) )
5153 expect ( pongUtils . queryOptions ( ) . queryKey ) . toEqual ( procedureUtilsSpy . mock . results [ 1 ] ! . value . queryOptions ( ) . queryKey )
5254 } )
5355
5456 it ( 'not recursive on symbol' , async ( ) => {
55- const utils = createRouterUtils ( client , [ '__base__' ] ) as any
57+ const utils = createRouterUtils ( client , {
58+ path : [ '__base__' ] ,
59+ } ) as any
5660
5761 expect ( utils [ Symbol . for ( 'a' ) ] ) . toBe ( undefined )
5862 } )
0 commit comments