@@ -11,7 +11,7 @@ beforeEach(() => {
1111} ) ;
1212
1313describe ( 'applyTunnelRouteOption()' , ( ) => {
14- it ( 'should correctly apply `tunnelRoute` option when conditions are met' , ( ) => {
14+ it ( 'Correctly applies `tunnelRoute` option when conditions are met' , ( ) => {
1515 globalWithInjectedValues . __sentryRewritesTunnelPath__ = '/my-error-monitoring-route' ;
1616 const options : any = {
1717 dsn :
'https://[email protected] /3333333' , @@ -22,7 +22,7 @@ describe('applyTunnelRouteOption()', () => {
2222 expect ( options . tunnel ) . toBe ( '/my-error-monitoring-route?o=2222222&p=3333333' ) ;
2323 } ) ;
2424
25- it ( 'should not apply `tunnelRoute` when DSN is missing' , ( ) => {
25+ it ( "Doesn't apply `tunnelRoute` when DSN is missing" , ( ) => {
2626 globalWithInjectedValues . __sentryRewritesTunnelPath__ = '/my-error-monitoring-route' ;
2727 const options : any = {
2828 // no dsn
@@ -33,7 +33,18 @@ describe('applyTunnelRouteOption()', () => {
3333 expect ( options . tunnel ) . toBeUndefined ( ) ;
3434 } ) ;
3535
36- it ( "should not apply `tunnelRoute` option when `tunnelRoute` option wasn't injected" , ( ) => {
36+ it ( "Doesn't apply `tunnelRoute` when DSN is invalid" , ( ) => {
37+ globalWithInjectedValues . __sentryRewritesTunnelPath__ = '/my-error-monitoring-route' ;
38+ const options : any = {
39+ dsn : 'invalidDsn' ,
40+ } as BrowserOptions ;
41+
42+ applyTunnelRouteOption ( options ) ;
43+
44+ expect ( options . tunnel ) . toBeUndefined ( ) ;
45+ } ) ;
46+
47+ it ( "Doesn't apply `tunnelRoute` option when `tunnelRoute` option wasn't injected" , ( ) => {
3748 const options : any = {
3849 dsn :
'https://[email protected] /3333333' , 3950 } as BrowserOptions ;
@@ -43,7 +54,7 @@ describe('applyTunnelRouteOption()', () => {
4354 expect ( options . tunnel ) . toBeUndefined ( ) ;
4455 } ) ;
4556
46- it ( 'should not apply `tunnelRoute` option when DSN is not a SaaS DSN' , ( ) => {
57+ it ( "Doesn't `tunnelRoute` option when DSN is not a SaaS DSN" , ( ) => {
4758 globalWithInjectedValues . __sentryRewritesTunnelPath__ = '/my-error-monitoring-route' ;
4859 const options : any = {
4960 dsn :
'https://[email protected] /3333333' ,
0 commit comments