@@ -26,22 +26,22 @@ describe('instantiate client', () => {
2626 apiKey : 'My API Key' ,
2727 } ) ;
2828
29- test ( 'they are used in the request' , ( ) => {
30- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' } ) ;
29+ test ( 'they are used in the request' , async ( ) => {
30+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' } ) ;
3131 expect ( ( req . headers as Headers ) [ 'x-my-default-header' ] ) . toEqual ( '2' ) ;
3232 } ) ;
3333
34- test ( 'can ignore `undefined` and leave the default' , ( ) => {
35- const { req } = client . buildRequest ( {
34+ test ( 'can ignore `undefined` and leave the default' , async ( ) => {
35+ const { req } = await client . buildRequest ( {
3636 path : '/foo' ,
3737 method : 'post' ,
3838 headers : { 'X-My-Default-Header' : undefined } ,
3939 } ) ;
4040 expect ( ( req . headers as Headers ) [ 'x-my-default-header' ] ) . toEqual ( '2' ) ;
4141 } ) ;
4242
43- test ( 'can be removed with `null`' , ( ) => {
44- const { req } = client . buildRequest ( {
43+ test ( 'can be removed with `null`' , async ( ) => {
44+ const { req } = await client . buildRequest ( {
4545 path : '/foo' ,
4646 method : 'post' ,
4747 headers : { 'X-My-Default-Header' : null } ,
@@ -239,20 +239,20 @@ describe('request building', () => {
239239 const client = new Orb ( { apiKey : 'My API Key' } ) ;
240240
241241 describe ( 'Content-Length' , ( ) => {
242- test ( 'handles multi-byte characters' , ( ) => {
243- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : '—' } } ) ;
242+ test ( 'handles multi-byte characters' , async ( ) => {
243+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : '—' } } ) ;
244244 expect ( ( req . headers as Record < string , string > ) [ 'content-length' ] ) . toEqual ( '20' ) ;
245245 } ) ;
246246
247- test ( 'handles standard characters' , ( ) => {
248- const { req } = client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : 'hello' } } ) ;
247+ test ( 'handles standard characters' , async ( ) => {
248+ const { req } = await client . buildRequest ( { path : '/foo' , method : 'post' , body : { value : 'hello' } } ) ;
249249 expect ( ( req . headers as Record < string , string > ) [ 'content-length' ] ) . toEqual ( '22' ) ;
250250 } ) ;
251251 } ) ;
252252
253253 describe ( 'custom headers' , ( ) => {
254- test ( 'handles undefined' , ( ) => {
255- const { req } = client . buildRequest ( {
254+ test ( 'handles undefined' , async ( ) => {
255+ const { req } = await client . buildRequest ( {
256256 path : '/foo' ,
257257 method : 'post' ,
258258 body : { value : 'hello' } ,
0 commit comments