@@ -87,7 +87,11 @@ describe('instantiate client', () => {
8787 error : jest . fn ( ) ,
8888 } ;
8989
90- const client = new Perplexity ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
90+ const client = new Perplexity ( {
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 Perplexity ( { logger : logger , logLevel : 'info' , apiKey : 'My API Key' } ) ;
114+ const client = new Perplexity ( {
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 [ 'PERPLEXITY_LOG' ] = 'debug' ;
160- const client = new Perplexity ( { logger : logger , logLevel : 'off' , apiKey : 'My API Key' } ) ;
168+ const client = new Perplexity ( {
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 [ 'PERPLEXITY_LOG' ] = 'not a log level' ;
176- const client = new Perplexity ( { logger : logger , logLevel : 'debug' , apiKey : 'My API Key' } ) ;
188+ const client = new Perplexity ( {
189+ logger : logger ,
190+ logLevel : 'debug' ,
191+ apiKey : 'My API Key' ,
192+ } ) ;
177193 expect ( client . logLevel ) . toBe ( 'debug' ) ;
178194 expect ( warnMock ) . not . toHaveBeenCalled ( ) ;
179195 } ) ;
@@ -543,7 +559,11 @@ describe('retries', () => {
543559 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
544560 } ;
545561
546- const client = new Perplexity ( { apiKey : 'My API Key' , timeout : 10 , fetch : testFetch } ) ;
562+ const client = new Perplexity ( {
563+ apiKey : 'My API Key' ,
564+ timeout : 10 ,
565+ fetch : testFetch ,
566+ } ) ;
547567
548568 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
549569 expect ( count ) . toEqual ( 2 ) ;
@@ -573,7 +593,11 @@ describe('retries', () => {
573593 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
574594 } ;
575595
576- const client = new Perplexity ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
596+ const client = new Perplexity ( {
597+ apiKey : 'My API Key' ,
598+ fetch : testFetch ,
599+ maxRetries : 4 ,
600+ } ) ;
577601
578602 expect ( await client . request ( { path : '/foo' , method : 'get' } ) ) . toEqual ( { a : 1 } ) ;
579603
@@ -597,7 +621,11 @@ describe('retries', () => {
597621 capturedRequest = init ;
598622 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
599623 } ;
600- const client = new Perplexity ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
624+ const client = new Perplexity ( {
625+ apiKey : 'My API Key' ,
626+ fetch : testFetch ,
627+ maxRetries : 4 ,
628+ } ) ;
601629
602630 expect (
603631 await client . request ( {
@@ -659,7 +687,11 @@ describe('retries', () => {
659687 capturedRequest = init ;
660688 return new Response ( JSON . stringify ( { a : 1 } ) , { headers : { 'Content-Type' : 'application/json' } } ) ;
661689 } ;
662- const client = new Perplexity ( { apiKey : 'My API Key' , fetch : testFetch , maxRetries : 4 } ) ;
690+ const client = new Perplexity ( {
691+ apiKey : 'My API Key' ,
692+ fetch : testFetch ,
693+ maxRetries : 4 ,
694+ } ) ;
663695
664696 expect (
665697 await client . request ( {
0 commit comments