@@ -88,7 +88,7 @@ describe('option encodeParams', () => {
8888 ...config ,
8989 filterEndpoints : [ 'findPetsByStatus' ] ,
9090 } ) ;
91- expect ( api ) . toContain ( 'status: encodeURIComponent(queryArg.status)' ) ;
91+ expect ( api ) . toContain ( 'status: encodeURIComponent(String( queryArg.status) )' ) ;
9292 } ) ;
9393
9494 it ( 'should encode path parameters' , async ( ) => {
@@ -97,7 +97,7 @@ describe('option encodeParams', () => {
9797 filterEndpoints : [ 'getOrderById' ] ,
9898 } ) ;
9999 // eslint-disable-next-line no-template-curly-in-string
100- expect ( api ) . toContain ( '`/store/order/${encodeURIComponent(queryArg.orderId)}`' ) ;
100+ expect ( api ) . toContain ( '`/store/order/${encodeURIComponent(String( queryArg.orderId) )}`' ) ;
101101 } ) ;
102102
103103 it ( 'should not encode body parameters' , async ( ) => {
@@ -106,7 +106,7 @@ describe('option encodeParams', () => {
106106 filterEndpoints : [ 'addPet' ] ,
107107 } ) ;
108108 expect ( api ) . toContain ( 'body: queryArg.pet' ) ;
109- expect ( api ) . not . toContain ( 'body: encodeURIComponent(queryArg.pet)' ) ;
109+ expect ( api ) . not . toContain ( 'body: encodeURIComponent(String( queryArg.pet) )' ) ;
110110 } ) ;
111111
112112 it ( 'should work correctly with flattenArg option' , async ( ) => {
@@ -116,7 +116,7 @@ describe('option encodeParams', () => {
116116 filterEndpoints : [ 'getOrderById' ] ,
117117 } ) ;
118118 // eslint-disable-next-line no-template-curly-in-string
119- expect ( api ) . toContain ( '`/store/order/${encodeURIComponent(queryArg)}`' ) ;
119+ expect ( api ) . toContain ( '`/store/order/${encodeURIComponent(String( queryArg) )}`' ) ;
120120 } ) ;
121121
122122 it ( 'should not encode parameters when encodeParams is false' , async ( ) => {
0 commit comments