@@ -19,7 +19,6 @@ const spyLogInfo = jest
1919const mockMailService = {
2020 sendMail : jest . fn ( ) ,
2121} ;
22- //we should have a test email inbocx to recieve all the email instead of skipping it, for e2e testing and for better pathways
2322describe ( 'stfcEmailHandler' , ( ) => {
2423 beforeAll ( ( ) => {
2524 container . registerInstance ( Tokens . MailService , mockMailService ) ;
@@ -30,7 +29,7 @@ describe('stfcEmailHandler', () => {
3029 jest . resetModules ( ) ;
3130 } ) ;
3231
33- describe ( 'handling CALL_CREATED event ' , ( ) => {
32+ describe ( 'These are the test for the handler function stfcEmailhandler ' , ( ) => {
3433 it ( 'When running Node process does not have env.FBS_EMAIL value' , ( ) => {
3534 process . env . FBS_EMAIL = '' ;
3635 const mockEvent = {
@@ -48,12 +47,9 @@ describe('stfcEmailHandler', () => {
4847 { }
4948 ) ;
5049 } ) ;
51- } ) ;
5250
53- describe ( 'mailService.sendMail is sucessful' , ( ) => {
54- it ( 'When all required settings are valid' , async ( ) => {
55- // here instead of using a rng email, we instead set a magic variable for readability
56- // This test us
51+ it ( 'mailService.sendMail is sucessful' , async ( ) => {
52+ // When all required settings are valid
5753 const inviteEmail = faker . internet . email ( ) ;
5854 process . env . FBS_EMAIL = inviteEmail ;
5955 const mockEvent = {
@@ -90,10 +86,9 @@ describe('stfcEmailHandler', () => {
9086 event : mockEvent ,
9187 } ) ;
9288 } ) ;
93- } ) ;
9489
95- describe ( 'mailService.sendMail is not sucessful' , ( ) => {
96- it ( ' Then mailService.catch is evoked, logError(x) will be present' , async ( ) => {
90+ it ( 'mailService.sendMail is not sucessful' , async ( ) => {
91+ // Then mailService.catch is evoked, logError(x) will be present
9792 const inviteEmail = faker . internet . email ( ) ;
9893 process . env . FBS_EMAIL = inviteEmail ;
9994 const mockEvent = {
0 commit comments