11import  nock  from  'nock' ; 
22require ( 'dotenv' ) . config ( ) ; 
3- import  {   expect   }  from  'chai ' ; 
3+ import  { expect ,   test }  from  '@jest/globals ' ; 
44import  MailSlurp  =  require( "../src" ) ; 
55import  fs  from  'fs' ; 
66
@@ -97,10 +97,9 @@ describe('MailSlurp helper', function () {
9797
9898  test ( 'should create an inbox' ,  async  ( )  =>  { 
9999    const  mailbox  =  await  I . haveNewMailbox ( ) ; 
100-     expect ( mailbox . id ) . to . be . a ( 'string' ) ; 
101-     expect ( mailbox . emailAddress ) . to . be . a ( 'string' ) ; 
102-     expect ( mailbox . emailAddress ) . to . contain ( '@' ) ; 
103-     expect ( mailbox . toString ( ) ) . to . eql ( mailbox . emailAddress ) ; 
100+     expect ( mailbox . id ) . toBe ( '123' ) ; 
101+     expect ( mailbox . emailAddress ) . toBe ( '[email protected] ' ) ;  102+     expect ( mailbox . toString ( ) ) . toEqual ( mailbox . emailAddress ) ; 
104103  } ) ; 
105104
106105  test ( 'should send and receive an email' ,  async  ( )  =>  { 
@@ -122,7 +121,7 @@ describe('MailSlurp helper', function () {
122121      attachments : [  attachmentId  ] 
123122    } ) ; 
124123    const  email  =  await  I . waitForLatestEmail ( 50 ) ; 
125-     expect ( email . body . trim ( ) ) . to . eql ( 'Testing' ) ; 
124+     expect ( email . body . trim ( ) ) . toEqual ( 'Testing' ) ; 
126125    await  I . seeInEmailSubject ( 'Hello' ) ; 
127126    await  I . seeEmailSubjectEquals ( 'Hello Test' ) ; 
128127    await  I . seeEmailIsFrom ( mailbox . emailAddress ) ; 
@@ -149,7 +148,7 @@ describe('MailSlurp helper', function () {
149148    } ) ; 
150149
151150    // Since the persistent mock returns emailObj, this should work 
152-     expect ( email . body . trim ( ) ) . to . eql ( 'Testing' ) ; 
151+     expect ( email . body . trim ( ) ) . toEqual ( 'Testing' ) ; 
153152    await  I . seeInEmailSubject ( 'Hello' ) ; 
154153    await  I . seeEmailSubjectEquals ( 'Hello Test' ) ; 
155154  } ,  10000 ) ; 
0 commit comments