@@ -262,6 +262,24 @@ describe('resource devboxes', () => {
262262 } ) ;
263263 } ) ;
264264
265+ test ( 'keepAlive' , async ( ) => {
266+ const responsePromise = client . devboxes . keepAlive ( 'id' ) ;
267+ const rawResponse = await responsePromise . asResponse ( ) ;
268+ expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
269+ const response = await responsePromise ;
270+ expect ( response ) . not . toBeInstanceOf ( Response ) ;
271+ const dataAndResponse = await responsePromise . withResponse ( ) ;
272+ expect ( dataAndResponse . data ) . toBe ( response ) ;
273+ expect ( dataAndResponse . response ) . toBe ( rawResponse ) ;
274+ } ) ;
275+
276+ test ( 'keepAlive: request options instead of params are passed correctly' , async ( ) => {
277+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
278+ await expect ( client . devboxes . keepAlive ( 'id' , { path : '/_stainless_unknown_path' } ) ) . rejects . toThrow (
279+ Runloop . NotFoundError ,
280+ ) ;
281+ } ) ;
282+
265283 test ( 'listDiskSnapshots' , async ( ) => {
266284 const responsePromise = client . devboxes . listDiskSnapshots ( ) ;
267285 const rawResponse = await responsePromise . asResponse ( ) ;
@@ -327,6 +345,24 @@ describe('resource devboxes', () => {
327345 const response = await client . devboxes . removeTunnel ( 'id' , { port : 0 } ) ;
328346 } ) ;
329347
348+ test ( 'resume' , async ( ) => {
349+ const responsePromise = client . devboxes . resume ( 'id' ) ;
350+ const rawResponse = await responsePromise . asResponse ( ) ;
351+ expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
352+ const response = await responsePromise ;
353+ expect ( response ) . not . toBeInstanceOf ( Response ) ;
354+ const dataAndResponse = await responsePromise . withResponse ( ) ;
355+ expect ( dataAndResponse . data ) . toBe ( response ) ;
356+ expect ( dataAndResponse . response ) . toBe ( rawResponse ) ;
357+ } ) ;
358+
359+ test ( 'resume: request options instead of params are passed correctly' , async ( ) => {
360+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
361+ await expect ( client . devboxes . resume ( 'id' , { path : '/_stainless_unknown_path' } ) ) . rejects . toThrow (
362+ Runloop . NotFoundError ,
363+ ) ;
364+ } ) ;
365+
330366 test ( 'shutdown' , async ( ) => {
331367 const responsePromise = client . devboxes . shutdown ( 'id' ) ;
332368 const rawResponse = await responsePromise . asResponse ( ) ;
@@ -403,6 +439,24 @@ describe('resource devboxes', () => {
403439 ) . rejects . toThrow ( Runloop . NotFoundError ) ;
404440 } ) ;
405441
442+ test ( 'suspend' , async ( ) => {
443+ const responsePromise = client . devboxes . suspend ( 'id' ) ;
444+ const rawResponse = await responsePromise . asResponse ( ) ;
445+ expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
446+ const response = await responsePromise ;
447+ expect ( response ) . not . toBeInstanceOf ( Response ) ;
448+ const dataAndResponse = await responsePromise . withResponse ( ) ;
449+ expect ( dataAndResponse . data ) . toBe ( response ) ;
450+ expect ( dataAndResponse . response ) . toBe ( rawResponse ) ;
451+ } ) ;
452+
453+ test ( 'suspend: request options instead of params are passed correctly' , async ( ) => {
454+ // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
455+ await expect ( client . devboxes . suspend ( 'id' , { path : '/_stainless_unknown_path' } ) ) . rejects . toThrow (
456+ Runloop . NotFoundError ,
457+ ) ;
458+ } ) ;
459+
406460 test ( 'uploadFile: only required params' , async ( ) => {
407461 const responsePromise = client . devboxes . uploadFile ( 'id' , { path : 'path' } ) ;
408462 const rawResponse = await responsePromise . asResponse ( ) ;
0 commit comments