@@ -171,7 +171,10 @@ describe('web3mail.sendEmail()', () => {
171171 protectedData : validProtectedData . address ,
172172 workerpoolMaxPrice : prodWorkerpoolPublicPrice ,
173173 } ) ;
174- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
174+ expect ( sendEmailResponse ) . toStrictEqual ( {
175+ taskId : expect . any ( String ) ,
176+ dealId : expect . any ( String ) ,
177+ } ) ;
175178 } ,
176179 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
177180 ) ;
@@ -273,7 +276,10 @@ describe('web3mail.sendEmail()', () => {
273276 protectedData : validProtectedData . address ,
274277 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
275278 } ) ;
276- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
279+ expect ( sendEmailResponse ) . toStrictEqual ( {
280+ taskId : expect . any ( String ) ,
281+ dealId : expect . any ( String ) ,
282+ } ) ;
277283 } ,
278284 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
279285 ) ;
@@ -303,7 +309,10 @@ describe('web3mail.sendEmail()', () => {
303309 protectedData : protectedDataForWhitelist . address ,
304310 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
305311 } ) ;
306- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
312+ expect ( sendEmailResponse ) . toStrictEqual ( {
313+ taskId : expect . any ( String ) ,
314+ dealId : expect . any ( String ) ,
315+ } ) ;
307316 } ,
308317 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
309318 ) ;
@@ -319,7 +328,10 @@ describe('web3mail.sendEmail()', () => {
319328 contentType : 'text/html' ,
320329 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
321330 } ) ;
322- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
331+ expect ( sendEmailResponse ) . toStrictEqual ( {
332+ taskId : expect . any ( String ) ,
333+ dealId : expect . any ( String ) ,
334+ } ) ;
323335 } ,
324336 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
325337 ) ;
@@ -334,7 +346,10 @@ describe('web3mail.sendEmail()', () => {
334346 senderName : 'Product Team' ,
335347 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
336348 } ) ;
337- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
349+ expect ( sendEmailResponse ) . toStrictEqual ( {
350+ taskId : expect . any ( String ) ,
351+ dealId : expect . any ( String ) ,
352+ } ) ;
338353 } ,
339354 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
340355 ) ;
@@ -353,7 +368,10 @@ describe('web3mail.sendEmail()', () => {
353368 senderName : 'Product Team' ,
354369 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
355370 } ) ;
356- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
371+ expect ( sendEmailResponse ) . toStrictEqual ( {
372+ taskId : expect . any ( String ) ,
373+ dealId : expect . any ( String ) ,
374+ } ) ;
357375 } ,
358376 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
359377 ) ;
@@ -368,7 +386,10 @@ describe('web3mail.sendEmail()', () => {
368386 workerpoolAddressOrEns : learnProdWorkerpoolAddress ,
369387 label : 'ID1234678' ,
370388 } ) ;
371- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
389+ expect ( sendEmailResponse ) . toStrictEqual ( {
390+ taskId : expect . any ( String ) ,
391+ dealId : expect . any ( String ) ,
392+ } ) ;
372393 // TODO check label in created deal
373394 } ,
374395 2 * MAX_EXPECTED_BLOCKTIME + MAX_EXPECTED_WEB2_SERVICES_TIME
@@ -457,7 +478,10 @@ describe('web3mail.sendEmail()', () => {
457478 // workerpoolAddressOrEns: prodWorkerpoolAddress, // default
458479 useVoucher : true ,
459480 } ) ;
460- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
481+ expect ( sendEmailResponse ) . toStrictEqual ( {
482+ taskId : expect . any ( String ) ,
483+ dealId : expect . any ( String ) ,
484+ } ) ;
461485 } ,
462486 2 * MAX_EXPECTED_BLOCKTIME +
463487 MAX_EXPECTED_WEB2_SERVICES_TIME +
@@ -567,7 +591,10 @@ describe('web3mail.sendEmail()', () => {
567591 workerpoolMaxPrice : nonSponsoredAmount ,
568592 useVoucher : true ,
569593 } ) ;
570- expect ( sendEmailResponse . taskId ) . toBeDefined ( ) ;
594+ expect ( sendEmailResponse ) . toStrictEqual ( {
595+ taskId : expect . any ( String ) ,
596+ dealId : expect . any ( String ) ,
597+ } ) ;
571598 } ,
572599 2 * MAX_EXPECTED_BLOCKTIME +
573600 MAX_EXPECTED_WEB2_SERVICES_TIME +
0 commit comments