@@ -41,13 +41,14 @@ describe("get (only URL)", () => {
4141 openapiTSFetch . configure ( {
4242 init : { baseUrl : BASE_URL } ,
4343 } ) ;
44+ let openapiTSFetchGET = openapiTSFetch . path ( "/url" ) . method ( "get" ) . create ( ) ;
4445
4546 bench ( "openapi-fetch" , async ( ) => {
4647 await openapiFetch . GET ( "/url" ) ;
4748 } ) ;
4849
4950 bench ( "openapi-typescript-fetch" , async ( ) => {
50- await openapiTSFetch . path ( "/url" ) . method ( "get" ) . create ( ) ( ) ;
51+ await openapiTSFetchGET ( ) ;
5152 } ) ;
5253
5354 bench ( "openapi-typescript-codegen" , async ( ) => {
@@ -76,6 +77,7 @@ describe("get (headers)", () => {
7677 openapiTSFetch . configure ( {
7778 init : { baseUrl : BASE_URL , headers : { "x-base-header" : 123 } } ,
7879 } ) ;
80+ let openapiTSFetchGET = openapiTSFetch . path ( "/url" ) . method ( "get" ) . create ( ) ;
7981
8082 bench ( "openapi-fetch" , async ( ) => {
8183 await openapiFetch . GET ( "/url" , {
@@ -84,7 +86,7 @@ describe("get (headers)", () => {
8486 } ) ;
8587
8688 bench ( "openapi-typescript-fetch" , async ( ) => {
87- await openapiTSFetch . path ( "/url" ) . method ( "get" ) . create ( ) ( null , {
89+ await openapiTSFetchGET ( null , {
8890 headers : { "x-header-1" : 123 , "x-header-2" : 456 } ,
8991 } ) ;
9092 } ) ;
0 commit comments