File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -923,6 +923,8 @@ describe('BaseClient', () => {
923
923
client . captureEvent ( { message : 'hello' } ) ;
924
924
925
925
expect ( TestClient . instance ! . event ) . toBeUndefined ( ) ;
926
+ // This proves that the reason the event didn't send/didn't get set on the test client is not because there was an
927
+ // error, but because `beforeSend` returned `null`
926
928
expect ( captureExceptionSpy ) . not . toBeCalled ( ) ;
927
929
expect ( loggerWarnSpy ) . toBeCalledWith ( '`beforeSend` returned `null`, will not send event.' ) ;
928
930
} ) ;
@@ -1068,6 +1070,8 @@ describe('BaseClient', () => {
1068
1070
client . captureEvent ( { message : 'hello' } , { } , scope ) ;
1069
1071
1070
1072
expect ( TestClient . instance ! . event ) . toBeUndefined ( ) ;
1073
+ // This proves that the reason the event didn't send/didn't get set on the test client is not because there was an
1074
+ // error, but because the event processor returned `null`
1071
1075
expect ( captureExceptionSpy ) . not . toBeCalled ( ) ;
1072
1076
expect ( loggerLogSpy ) . toBeCalledWith ( 'An event processor returned `null`, will not send event.' ) ;
1073
1077
} ) ;
You can’t perform that action at this time.
0 commit comments