@@ -940,13 +940,13 @@ describe('BaseClient', () => {
940940 const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN , beforeSend } ) ;
941941 const client = new TestClient ( options ) ;
942942 const captureExceptionSpy = jest . spyOn ( client , 'captureException' ) ;
943- const loggerErrorSpy = jest . spyOn ( logger , 'error ' ) ;
943+ const loggerWarnSpy = jest . spyOn ( logger , 'warn ' ) ;
944944
945945 client . captureEvent ( { message : 'hello' } ) ;
946946
947947 expect ( TestClient . instance ! . event ) . toBeUndefined ( ) ;
948948 expect ( captureExceptionSpy ) . not . toBeCalled ( ) ;
949- expect ( loggerErrorSpy ) . toBeCalledWith ( new SentryError ( '`beforeSend` returned `null`, will not send event.' ) ) ;
949+ expect ( loggerWarnSpy ) . toBeCalledWith ( new SentryError ( '`beforeSend` returned `null`, will not send event.' ) ) ;
950950 } ) ;
951951
952952 test ( 'calls beforeSend and log info about invalid return value' , ( ) => {
@@ -958,12 +958,12 @@ describe('BaseClient', () => {
958958 // @ts -ignore we need to test regular-js behavior
959959 const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN , beforeSend } ) ;
960960 const client = new TestClient ( options ) ;
961- const loggerErrorSpy = jest . spyOn ( logger , 'error ' ) ;
961+ const loggerWarnSpy = jest . spyOn ( logger , 'warn ' ) ;
962962
963963 client . captureEvent ( { message : 'hello' } ) ;
964964
965965 expect ( TestClient . instance ! . event ) . toBeUndefined ( ) ;
966- expect ( loggerErrorSpy ) . toBeCalledWith (
966+ expect ( loggerWarnSpy ) . toBeCalledWith (
967967 new SentryError ( '`beforeSend` method has to return `null` or a valid event.' ) ,
968968 ) ;
969969 }
@@ -1091,15 +1091,15 @@ describe('BaseClient', () => {
10911091
10921092 const client = new TestClient ( getDefaultTestClientOptions ( { dsn : PUBLIC_DSN } ) ) ;
10931093 const captureExceptionSpy = jest . spyOn ( client , 'captureException' ) ;
1094- const loggerErrorSpy = jest . spyOn ( logger , 'error ' ) ;
1094+ const loggerWarnSpy = jest . spyOn ( logger , 'warn ' ) ;
10951095 const scope = new Scope ( ) ;
10961096 scope . addEventProcessor ( ( ) => null ) ;
10971097
10981098 client . captureEvent ( { message : 'hello' } , { } , scope ) ;
10991099
11001100 expect ( TestClient . instance ! . event ) . toBeUndefined ( ) ;
11011101 expect ( captureExceptionSpy ) . not . toBeCalled ( ) ;
1102- expect ( loggerErrorSpy ) . toBeCalledWith ( new SentryError ( 'An event processor returned null, will not send event.' ) ) ;
1102+ expect ( loggerWarnSpy ) . toBeCalledWith ( new SentryError ( 'An event processor returned null, will not send event.' ) ) ;
11031103 } ) ;
11041104
11051105 // TODO(v7): Add back tests with client reports
@@ -1131,7 +1131,7 @@ describe('BaseClient', () => {
11311131 const options = getDefaultTestClientOptions ( { dsn : PUBLIC_DSN } ) ;
11321132 const client = new TestClient ( options ) ;
11331133 const captureExceptionSpy = jest . spyOn ( client , 'captureException' ) ;
1134- const loggerErrorSpy = jest . spyOn ( logger , 'error ' ) ;
1134+ const loggerWarnSpy = jest . spyOn ( logger , 'warn ' ) ;
11351135 const scope = new Scope ( ) ;
11361136 const exception = new Error ( 'sorry' ) ;
11371137 scope . addEventProcessor ( ( ) => {
@@ -1147,7 +1147,7 @@ describe('BaseClient', () => {
11471147 } ,
11481148 originalException : exception ,
11491149 } ) ;
1150- expect ( loggerErrorSpy ) . toBeCalledWith (
1150+ expect ( loggerWarnSpy ) . toBeCalledWith (
11511151 new SentryError (
11521152 `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${ exception } ` ,
11531153 ) ,
0 commit comments