UNPKG

syntropylog

Version:

An instance manager with observability for Node.js applications

28 lines (27 loc) 818 B
/** * MockSerializerRegistry - Framework Agnostic Mock * * This mock provides a testing-agnostic version of SerializerRegistry * that can be used with both Vitest and Jest without conflicts. */ export interface ILogger { warn: (message: string, metadata?: any) => void; } export type SerializerMap = Record<string, (value: unknown) => string>; export interface SerializerRegistryOptions { serializers?: SerializerMap; timeoutMs?: number; } export declare class MockSerializerRegistry { private serializers; private errorKeys; private timeoutMs; private spyFn; readonly process: any; readonly setSerializer: any; readonly setError: any; readonly setTimeout: any; readonly reset: any; constructor(spyFn?: (implementation?: any) => any); private createMock; }