@@ -87,7 +87,11 @@ describe('instantiate client', () => {
8787 error : jest . fn ( ) ,
8888 } ;
8989
90- const client = new Kernel ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
90+ const client = new Kernel ( {
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 Kernel ( { logger : logger , logLevel : 'info' , apiKey : 'My API Key' } ) ;
114+ const client = new Kernel ( {
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 [ 'KERNEL_LOG' ] = 'debug' ;
160- const client = new Kernel ( { logger : logger , logLevel : 'off' , apiKey : 'My API Key' } ) ;
168+ const client = new Kernel ( {
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 [ 'KERNEL_LOG' ] = 'not a log level' ;
176- const client = new Kernel ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
188+ const client = new Kernel ( {
189+ logger : logger ,
190+ logLevel : 'debug' ,
191+ apiKey : 'My API Key' ,
192+ } ) ;
177193 expect ( client . logLevel ) . toBe ( 'debug' ) ;
178194 expect ( warnMock ) . not . toHaveBeenCalled ( ) ;
179195 } ) ;
@@ -267,7 +283,11 @@ describe('instantiate client', () => {
267283 return new Response ( JSON . stringify ( { } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
268284 } ;
269285
270- const client = new Kernel ( { baseURL : 'http://localhost:5000/' , apiKey : 'My API Key' , fetch : testFetch } ) ;
286+ const client = new Kernel ( {
287+ baseURL : 'http://localhost:5000/' ,
288+ apiKey : 'My API Key' ,
289+ fetch : testFetch ,
290+ } ) ;
271291
272292 await client . patch ( '/foo' ) ;
273293 expect ( capturedRequest ?. method ) . toEqual ( 'PATCH' ) ;
@@ -320,7 +340,11 @@ describe('instantiate client', () => {
320340 `"Ambiguous URL; The \`baseURL\` option (or KERNEL_BASE_URL env var) and the \`environment\` option are given. If you want to use the environment you must pass baseURL: null"` ,
321341 ) ;
322342
323- const client = new Kernel ( { apiKey : 'My API Key' , baseURL : null , environment : 'production' } ) ;
343+ const client = new Kernel ( {
344+ apiKey : 'My API Key' ,
345+ baseURL : null ,
346+ environment : 'production' ,
347+ } ) ;
324348 expect ( client . baseURL ) . toEqual ( 'https://api.onkernel.com/' ) ;
325349 } ) ;
326350
@@ -358,7 +382,11 @@ describe('instantiate client', () => {
358382
359383 describe ( 'withOptions' , ( ) => {
360384 test ( 'creates a new client with overridden options' , async ( ) => {
361- const client = new Kernel ( { baseURL : 'http://localhost:5000/' , maxRetries : 3 , apiKey : 'My API Key' } ) ;
385+ const client = new Kernel ( {
386+ baseURL : 'http://localhost:5000/' ,
387+ maxRetries : 3 ,
388+ apiKey : 'My API Key' ,
389+ } ) ;
362390
363391 const newClient = client . withOptions ( {
364392 maxRetries : 5 ,
@@ -398,7 +426,11 @@ describe('instantiate client', () => {
398426 } ) ;
399427
400428 test ( 'respects runtime property changes when creating new client' , ( ) => {
401- const client = new Kernel ( { baseURL : 'http://localhost:5000/' , timeout : 1000 , apiKey : 'My API Key' } ) ;
429+ const client = new Kernel ( {
430+ baseURL : 'http://localhost:5000/' ,
431+ timeout : 1000 ,
432+ apiKey : 'My API Key' ,
433+ } ) ;
402434
403435 // Modify the client properties directly after creation
404436 client . baseURL = 'http://localhost:6000/' ;
@@ -544,7 +576,11 @@ describe('retries', () => {
544576 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
545577 } ;
546578
547- const client = new Kernel ( { apiKey : 'My API Key' , timeout : 10 , fetch : testFetch } ) ;
579+ const client = new Kernel ( {
580+ apiKey : 'My API Key' ,
581+ timeout : 10 ,
582+ fetch : testFetch ,
583+ } ) ;
548584
549585 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
550586 expect ( count ) . toEqual ( 2 ) ;
@@ -574,7 +610,11 @@ describe('retries', () => {
574610 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
575611 } ;
576612
577- const client = new Kernel ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
613+ const client = new Kernel ( {
614+ apiKey : 'My API Key' ,
615+ fetch : testFetch ,
616+ maxRetries : 4 ,
617+ } ) ;
578618
579619 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
580620
@@ -598,7 +638,11 @@ describe('retries', () => {
598638 capturedRequest = init ;
599639 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
600640 } ;
601- const client = new Kernel ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
641+ const client = new Kernel ( {
642+ apiKey : 'My API Key' ,
643+ fetch : testFetch ,
644+ maxRetries : 4 ,
645+ } ) ;
602646
603647 expect (
604648 await client . request ( {
@@ -660,7 +704,11 @@ describe('retries', () => {
660704 capturedRequest = init ;
661705 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
662706 } ;
663- const client = new Kernel ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
707+ const client = new Kernel ( {
708+ apiKey : 'My API Key' ,
709+ fetch : testFetch ,
710+ maxRetries : 4 ,
711+ } ) ;
664712
665713 expect (
666714 await client . request ( {
0 commit comments