Skip to content

Commit e892aa7

Browse files
committed
suppress next console error
1 parent da5b2e0 commit e892aa7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/nextjs/test/utils/tunnelRoute.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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", () => {

0 commit comments

Comments
 (0)