From de12c0554fbf9b57f2d0fc4dd7a5292334f255b8 Mon Sep 17 00:00:00 2001 From: Jeffrey Rooks Date: Mon, 2 Sep 2024 22:10:01 -0400 Subject: [PATCH] fix: use debug instead of log --- packages/core/src/exchanges/debug.test.ts | 6 +++--- packages/core/src/exchanges/debug.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/src/exchanges/debug.test.ts b/packages/core/src/exchanges/debug.test.ts index fb8d930dbf..af11940865 100644 --- a/packages/core/src/exchanges/debug.test.ts +++ b/packages/core/src/exchanges/debug.test.ts @@ -29,7 +29,7 @@ beforeEach(() => { }); it('forwards query operations correctly', async () => { - vi.spyOn(globalThis.console, 'log').mockImplementation(() => { + vi.spyOn(globalThis.console, 'debug').mockImplementation(() => { /** Do NOthing */ }); const { source: ops$, next, complete } = input; @@ -39,9 +39,9 @@ it('forwards query operations correctly', async () => { next(queryOperation); complete(); // eslint-disable-next-line no-console - expect(console.log).toBeCalled(); + expect(console.debug).toBeCalled(); // eslint-disable-next-line no-console - expect(console.log).toBeCalledTimes(2); + expect(console.debug).toBeCalledTimes(2); }); describe('production', () => { diff --git a/packages/core/src/exchanges/debug.ts b/packages/core/src/exchanges/debug.ts index d0b5dd4771..64306dc4ce 100644 --- a/packages/core/src/exchanges/debug.ts +++ b/packages/core/src/exchanges/debug.ts @@ -23,11 +23,11 @@ export const debugExchange: Exchange = ({ forward }) => { pipe( ops$, // eslint-disable-next-line no-console - tap(op => console.log('[Exchange debug]: Incoming operation: ', op)), + tap(op => console.debug('[Exchange debug]: Incoming operation: ', op)), forward, tap(result => // eslint-disable-next-line no-console - console.log('[Exchange debug]: Completed operation: ', result) + console.debug('[Exchange debug]: Completed operation: ', result) ) ); }