UNPKG

@notjustcoders/ioc-arise

Version:

Arise type-safe IoC containers from your code. Zero overhead, zero coupling.

36 lines 1.44 kB
import { MockConfig } from './configManager'; import { ClassInfo } from '../types'; /** * Utility class for resolving mock classes based on configuration */ export declare class MockClassResolver { private mockConfig; private availableClasses; constructor(mockConfig: MockConfig, availableClasses: ClassInfo[]); /** * Resolves a mock class for the given target class name * @param targetClassName - The name of the class to find a mock for * @returns The mock class info if found, undefined otherwise */ resolveMockClass(targetClassName: string): ClassInfo | undefined; /** * Checks if a class name matches any of the configured glob patterns * @param className - The class name to check * @returns True if the class name matches any glob pattern */ private isMatchingGlobPattern; /** * Determines if a mock class is intended for a specific target class * Uses fuzzy matching to handle various naming conventions * @param mockClassName - The name of the mock class * @param targetClassName - The name of the target class * @returns True if the mock class is intended for the target class */ private isMockForTarget; /** * Gets all available mock classes based on the configuration * @returns Array of mock class info objects */ getAllMockClasses(): ClassInfo[]; } //# sourceMappingURL=mock-class-resolver.d.ts.map