File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/nextjs/test/utils Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ describe('applyTunnelRouteOption()', () => {
3434 } ) ;
3535
3636 it ( "Doesn't apply `tunnelRoute` when DSN is invalid" , ( ) => {
37+ // Avoid polluting the test output with error messages
38+ const mockConsoleError = jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) ;
39+
3740 globalWithInjectedValues . _sentryRewritesTunnelPath = '/my-error-monitoring-route' ;
3841 const options : any = {
3942 dsn : 'invalidDsn' ,
@@ -42,6 +45,8 @@ describe('applyTunnelRouteOption()', () => {
4245 applyTunnelRouteOption ( options ) ;
4346
4447 expect ( options . tunnel ) . toBeUndefined ( ) ;
48+
49+ mockConsoleError . mockRestore ( ) ;
4550 } ) ;
4651
4752 it ( "Doesn't apply `tunnelRoute` option when `tunnelRoute` option wasn't injected" , ( ) => {
You can’t perform that action at this time.
0 commit comments