Skip to content

Commit

Permalink
fix: logger issue
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Dec 1, 2023
1 parent 031bcb9 commit ee5d759
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { bunyamin, isDebug, threadGroups } from 'bunyamin';
import { noop } from './noop';

threadGroups.add({ id: 'ipc-server', displayName: 'IPC Server (jest-metadata)' });
threadGroups.add({ id: 'ipc-client', displayName: 'IPC Client (jest-metadata)' });
Expand All @@ -14,8 +13,10 @@ function isTraceEnabled(): boolean {
return isDebug('jest-metadata');
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const optimizeTracing: <F>(f: F) => F = isTraceEnabled() ? (f) => f : ((() => noop) as any);
const EMPTY = {};
const NOOP: any = () => EMPTY;

export const optimizeTracing: <F>(f: F) => F = isTraceEnabled() ? (f) => f : () => NOOP;

export const logger = bunyamin.child({ cat: 'jest-metadata' });

Expand Down
4 changes: 0 additions & 4 deletions src/utils/noop.ts

This file was deleted.

0 comments on commit ee5d759

Please sign in to comment.