@@ -174,12 +174,10 @@ describe('web3telegram.sendTelegram()', () => {
174174 protectedData : validProtectedData . address ,
175175 workerpoolMaxPrice : prodWorkerpoolPublicPrice ,
176176 } ) ;
177- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
178- expect (
179- 'taskId' in sendTelegramResponse
180- ? sendTelegramResponse . taskId
181- : undefined
182- ) . toBeDefined ( ) ;
177+ expect ( sendTelegramResponse ) . toStrictEqual ( {
178+ dealId : expect . any ( String ) ,
179+ taskId : expect . any ( String ) ,
180+ } ) ;
183181 } ,
184182 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
185183 ) ;
@@ -290,12 +288,10 @@ describe('web3telegram.sendTelegram()', () => {
290288 protectedData : validProtectedData . address ,
291289 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
292290 } ) ;
293- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
294- expect (
295- 'taskId' in sendTelegramResponse
296- ? sendTelegramResponse . taskId
297- : undefined
298- ) . toBeDefined ( ) ;
291+ expect ( sendTelegramResponse ) . toStrictEqual ( {
292+ dealId : expect . any ( String ) ,
293+ taskId : expect . any ( String ) ,
294+ } ) ;
299295 } ,
300296 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
301297 ) ;
@@ -323,11 +319,10 @@ describe('web3telegram.sendTelegram()', () => {
323319 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
324320 } ) ;
325321 expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
326- expect (
327- 'taskId' in sendTelegramResponse
328- ? sendTelegramResponse . taskId
329- : undefined
330- ) . toBeDefined ( ) ;
322+ expect ( sendTelegramResponse ) . toStrictEqual ( {
323+ dealId : expect . any ( String ) ,
324+ taskId : expect . any ( String ) ,
325+ } ) ;
331326 } ,
332327 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
333328 ) ;
@@ -344,11 +339,10 @@ describe('web3telegram.sendTelegram()', () => {
344339 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
345340 } ) ;
346341 expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
347- expect (
348- 'taskId' in sendTelegramResponse
349- ? sendTelegramResponse . taskId
350- : undefined
351- ) . toBeDefined ( ) ;
342+ expect ( sendTelegramResponse ) . toStrictEqual ( {
343+ dealId : expect . any ( String ) ,
344+ taskId : expect . any ( String ) ,
345+ } ) ;
352346 } ,
353347 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
354348 ) ;
@@ -365,11 +359,10 @@ describe('web3telegram.sendTelegram()', () => {
365359 } ) ;
366360 expect ( sendTelegramResponse ) . toBeDefined ( ) ;
367361 expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
368- expect (
369- 'taskId' in sendTelegramResponse
370- ? sendTelegramResponse . taskId
371- : undefined
372- ) . toBeDefined ( ) ;
362+ expect ( sendTelegramResponse ) . toStrictEqual ( {
363+ dealId : expect . any ( String ) ,
364+ taskId : expect . any ( String ) ,
365+ } ) ;
373366 } ,
374367 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
375368 ) ;
@@ -387,12 +380,10 @@ describe('web3telegram.sendTelegram()', () => {
387380 senderName : 'Product Team' ,
388381 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
389382 } ) ;
390- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
391- expect (
392- 'taskId' in sendTelegramResponse
393- ? sendTelegramResponse . taskId
394- : undefined
395- ) . toBeDefined ( ) ;
383+ expect ( sendTelegramResponse ) . toStrictEqual ( {
384+ dealId : expect . any ( String ) ,
385+ taskId : expect . any ( String ) ,
386+ } ) ;
396387 } ,
397388 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
398389 ) ;
@@ -406,12 +397,10 @@ describe('web3telegram.sendTelegram()', () => {
406397 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
407398 label : 'ID1234678' ,
408399 } ) ;
409- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
410- expect (
411- 'taskId' in sendTelegramResponse
412- ? sendTelegramResponse . taskId
413- : undefined
414- ) . toBeDefined ( ) ;
400+ expect ( sendTelegramResponse ) . toStrictEqual ( {
401+ dealId : expect . any ( String ) ,
402+ taskId : expect . any ( String ) ,
403+ } ) ;
415404 // TODO check label in created deal
416405 } ,
417406 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
@@ -500,12 +489,10 @@ describe('web3telegram.sendTelegram()', () => {
500489 // workerpoolAddressOrEns: prodWorkerpoolAddress, // default
501490 useVoucher : true ,
502491 } ) ;
503- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
504- expect (
505- 'taskId' in sendTelegramResponse
506- ? sendTelegramResponse . taskId
507- : undefined
508- ) . toBeDefined ( ) ;
492+ expect ( sendTelegramResponse ) . toStrictEqual ( {
493+ dealId : expect . any ( String ) ,
494+ taskId : expect . any ( String ) ,
495+ } ) ;
509496 } ,
510497 2 * MAX_EXPECTED_BLOCKTIME +
511498 MAX_EXPECTED_WEB2_SERVICES_TIME +
@@ -561,12 +548,10 @@ describe('web3telegram.sendTelegram()', () => {
561548 workerpoolMaxPrice : nonSponsoredAmount ,
562549 useVoucher : true ,
563550 } ) ;
564- expect ( 'taskId' in sendTelegramResponse ) . toBe ( true ) ;
565- expect (
566- 'taskId' in sendTelegramResponse
567- ? sendTelegramResponse . taskId
568- : undefined
569- ) . toBeDefined ( ) ;
551+ expect ( sendTelegramResponse ) . toStrictEqual ( {
552+ dealId : expect . any ( String ) ,
553+ taskId : expect . any ( String ) ,
554+ } ) ;
570555 } ,
571556 2 * MAX_EXPECTED_BLOCKTIME +
572557 MAX_EXPECTED_WEB2_SERVICES_TIME +
0 commit comments