@@ -25,22 +25,22 @@ describe('instantiate client', () => {
2525 defaultHeaders : { 'X-My-Default-Header' : '2' } ,
2626 } ) ;
2727
28- test ( 'they are used in the request' , ( ) => {
29- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' } ) ;
28+ test ( 'they are used in the request' , async ( ) => {
29+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' } ) ;
3030 expect ( ( req . headers as Headers ) [ 'x-my-default-header' ] ) . toEqual ( '2' ) ;
3131 } ) ;
3232
33- test ( 'can ignore `undefined` and leave the default' , ( ) => {
34- const { req } = client . buildRequest ( {
33+ test ( 'can ignore `undefined` and leave the default' , async ( ) => {
34+ const { req } = await client . buildRequest ( {
3535 path : '/foo' ,
3636 method : 'post' ,
3737 headers : { 'X-My-Default-Header' : undefined } ,
3838 } ) ;
3939 expect ( ( req . headers as Headers ) [ 'x-my-default-header' ] ) . toEqual ( '2' ) ;
4040 } ) ;
4141
42- test ( 'can be removed with `null`' , ( ) => {
43- const { req } = client . buildRequest ( {
42+ test ( 'can be removed with `null`' , async ( ) => {
43+ const { req } = await client . buildRequest ( {
4444 path : '/foo' ,
4545 method : 'post' ,
4646 headers : { 'X-My-Default-Header' : null } ,
@@ -209,20 +209,20 @@ describe('request building', () => {
209209 const client = new LlamaStackClient ( { } ) ;
210210
211211 describe ( 'Content-Length' , ( ) => {
212- test ( 'handles multi-byte characters' , ( ) => {
213- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : '—' } } ) ;
212+ test ( 'handles multi-byte characters' , async ( ) => {
213+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : '—' } } ) ;
214214 expect ( ( req . headers as Record < string , string > ) [ 'content-length' ] ) . toEqual ( '20' ) ;
215215 } ) ;
216216
217- test ( 'handles standard characters' , ( ) => {
218- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : 'hello' } } ) ;
217+ test ( 'handles standard characters' , async ( ) => {
218+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : 'hello' } } ) ;
219219 expect ( ( req . headers as Record < string , string > ) [ 'content-length' ] ) . toEqual ( '22' ) ;
220220 } ) ;
221221 } ) ;
222222
223223 describe ( 'custom headers' , ( ) => {
224- test ( 'handles undefined' , ( ) => {
225- const { req } = client . buildRequest ( {
224+ test ( 'handles undefined' , async ( ) => {
225+ const { req } = await client . buildRequest ( {
226226 path : '/foo' ,
227227 method : 'post' ,
228228 body : { value : 'hello' } ,
0 commit comments