@@ -46,6 +46,11 @@ describe('emailIsBad', () => {
4646 expect ( result ) . toBe ( true ) ;
4747 } ) ;
4848
49+ it ( 'should return true for apexgunparts.space domain' , ( ) => {
50+ const result = emailIsBad ( '4@apexgunparts.space' ) ;
51+ expect ( result ) . toBe ( true ) ;
52+ } ) ;
53+
4954 it ( 'should return false for legitimate email domains' , ( ) => {
5055 const legitimateEmails = [
5156 'user@gmail.com' ,
@@ -153,6 +158,11 @@ describe('fakeSubscribe', () => {
153158 const result = await fakeSubscribe ( { email : 'test@abhoward.site' } ) ;
154159 expect ( result ) . toEqual ( { success : true } ) ;
155160 } ) ;
161+
162+ it ( 'should return success for apexgunparts.space domain' , async ( ) => {
163+ const result = await fakeSubscribe ( { email : '4@apexgunparts.space' } ) ;
164+ expect ( result ) . toEqual ( { success : true } ) ;
165+ } ) ;
156166} ) ;
157167
158168describe ( 'isContactEvent' , ( ) => {
@@ -448,6 +458,23 @@ describe('subscribe', () => {
448458 expect ( resend . contacts . create ) . not . toHaveBeenCalled ( ) ;
449459 } ) ;
450460
461+ it ( 'should return fake response for apexgunparts.space emails' , async ( ) => {
462+ const badSubscriber = {
463+ email : '4@apexgunparts.space' ,
464+ firstName : 'Spam' ,
465+ lastName : 'Bot' ,
466+ } ;
467+
468+ const result = await subscribe ( badSubscriber ) ;
469+ expect ( result ) . toEqual ( {
470+ data : {
471+ id : '123' ,
472+ } ,
473+ error : null ,
474+ } ) ;
475+ expect ( resend . contacts . create ) . not . toHaveBeenCalled ( ) ;
476+ } ) ;
477+
451478 it ( 'should create contact for legitimate emails when contact does not exist' , async ( ) => {
452479 const legitimateSubscriber = {
453480 email : 'user@example.com' ,
0 commit comments