@@ -87,7 +87,11 @@ describe('instantiate client', () => {
8787 error : jest . fn ( ) ,
8888 } ;
8989
90- const client = new Grid ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
90+ const client = new Grid ( {
91+ logger : logger ,
92+ logLevel : 'debug' ,
93+ apiKey : 'My API Key' ,
94+ } ) ;
9195
9296 await forceAPIResponseForClient ( client ) ;
9397 expect ( debugMock ) . toHaveBeenCalled ( ) ;
@@ -107,7 +111,11 @@ describe('instantiate client', () => {
107111 error : jest . fn ( ) ,
108112 } ;
109113
110- const client = new Grid ( { logger : logger , logLevel : 'info' , apiKey : 'My API Key' } ) ;
114+ const client = new Grid ( {
115+ logger : logger ,
116+ logLevel : 'info' ,
117+ apiKey : 'My API Key' ,
118+ } ) ;
111119
112120 await forceAPIResponseForClient ( client ) ;
113121 expect ( debugMock ) . not . toHaveBeenCalled ( ) ;
@@ -157,7 +165,11 @@ describe('instantiate client', () => {
157165 } ;
158166
159167 process . env [ 'GRID_LOG' ] = 'debug' ;
160- const client = new Grid ( { logger : logger , logLevel : 'off' , apiKey : 'My API Key' } ) ;
168+ const client = new Grid ( {
169+ logger : logger ,
170+ logLevel : 'off' ,
171+ apiKey : 'My API Key' ,
172+ } ) ;
161173
162174 await forceAPIResponseForClient ( client ) ;
163175 expect ( debugMock ) . not . toHaveBeenCalled ( ) ;
@@ -173,7 +185,11 @@ describe('instantiate client', () => {
173185 } ;
174186
175187 process . env [ 'GRID_LOG' ] = 'not a log level' ;
176- const client = new Grid ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
188+ const client = new Grid ( {
189+ logger : logger ,
190+ logLevel : 'debug' ,
191+ apiKey : 'My API Key' ,
192+ } ) ;
177193 expect ( client . logLevel ) . toBe ( 'debug' ) ;
178194 expect ( warnMock ) . not . toHaveBeenCalled ( ) ;
179195 } ) ;
@@ -227,7 +243,11 @@ describe('instantiate client', () => {
227243
228244 test ( 'explicit global fetch' , async ( ) => {
229245 // make sure the global fetch type is assignable to our Fetch type
230- const client = new Grid ( { baseURL : 'http://localhost:5000/' , apiKey : 'My API Key' , fetch : defaultFetch } ) ;
246+ const client = new Grid ( {
247+ baseURL : 'http://localhost:5000/' ,
248+ apiKey : 'My API Key' ,
249+ fetch : defaultFetch ,
250+ } ) ;
231251 } ) ;
232252
233253 test ( 'custom signal' , async ( ) => {
@@ -263,7 +283,11 @@ describe('instantiate client', () => {
263283 return new Response ( JSON . stringify ( { } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
264284 } ;
265285
266- const client = new Grid ( { baseURL : 'http://localhost:5000/' , apiKey : 'My API Key' , fetch : testFetch } ) ;
286+ const client = new Grid ( {
287+ baseURL : 'http://localhost:5000/' ,
288+ apiKey : 'My API Key' ,
289+ fetch : testFetch ,
290+ } ) ;
267291
268292 await client . patch ( '/foo' ) ;
269293 expect ( capturedRequest ?. method ) . toEqual ( 'PATCH' ) ;
@@ -341,7 +365,11 @@ describe('instantiate client', () => {
341365
342366 describe ( 'withOptions' , ( ) => {
343367 test ( 'creates a new client with overridden options' , async ( ) => {
344- const client = new Grid ( { baseURL : 'http://localhost:5000/' , maxRetries : 3 , apiKey : 'My API Key' } ) ;
368+ const client = new Grid ( {
369+ baseURL : 'http://localhost:5000/' ,
370+ maxRetries : 3 ,
371+ apiKey : 'My API Key' ,
372+ } ) ;
345373
346374 const newClient = client . withOptions ( {
347375 maxRetries : 5 ,
@@ -381,7 +409,11 @@ describe('instantiate client', () => {
381409 } ) ;
382410
383411 test ( 'respects runtime property changes when creating new client' , ( ) => {
384- const client = new Grid ( { baseURL : 'http://localhost:5000/' , timeout : 1000 , apiKey : 'My API Key' } ) ;
412+ const client = new Grid ( {
413+ baseURL : 'http://localhost:5000/' ,
414+ timeout : 1000 ,
415+ apiKey : 'My API Key' ,
416+ } ) ;
385417
386418 // Modify the client properties directly after creation
387419 client . baseURL = 'http://localhost:6000/' ;
@@ -527,7 +559,11 @@ describe('retries', () => {
527559 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
528560 } ;
529561
530- const client = new Grid ( { apiKey : 'My API Key' , timeout : 10 , fetch : testFetch } ) ;
562+ const client = new Grid ( {
563+ apiKey : 'My API Key' ,
564+ timeout : 10 ,
565+ fetch : testFetch ,
566+ } ) ;
531567
532568 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
533569 expect ( count ) . toEqual ( 2 ) ;
@@ -557,7 +593,11 @@ describe('retries', () => {
557593 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
558594 } ;
559595
560- const client = new Grid ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
596+ const client = new Grid ( {
597+ apiKey : 'My API Key' ,
598+ fetch : testFetch ,
599+ maxRetries : 4 ,
600+ } ) ;
561601
562602 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
563603
@@ -581,7 +621,11 @@ describe('retries', () => {
581621 capturedRequest = init ;
582622 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
583623 } ;
584- const client = new Grid ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
624+ const client = new Grid ( {
625+ apiKey : 'My API Key' ,
626+ fetch : testFetch ,
627+ maxRetries : 4 ,
628+ } ) ;
585629
586630 expect (
587631 await client . request ( {
@@ -643,7 +687,11 @@ describe('retries', () => {
643687 capturedRequest = init ;
644688 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
645689 } ;
646- const client = new Grid ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
690+ const client = new Grid ( {
691+ apiKey : 'My API Key' ,
692+ fetch : testFetch ,
693+ maxRetries : 4 ,
694+ } ) ;
647695
648696 expect (
649697 await client . request ( {
0 commit comments