/**
 * Testing Utilities and Fixtures
 *
 * Provides reusable test fixtures and utilities to reduce duplication
 * and improve test maintainability across the codebase.
 */
import { type Mock } from 'bun:test';
/**
 * Temporary directory fixture for isolated test environments
 *
 * Creates a unique temp directory for each test and ensures proper cleanup.
 *
 * @example
 * ```ts
 * describe('MyTest', () => {
 *   let fixture: TempDirectoryFixture
 *
 *   beforeEach(async () => {
 *     fixture = new TempDirectoryFixture()
 *     const dir = await fixture.setup()
 *   })
 *
 *   afterEach(async () => {
 *     await fixture.teardown()
 *   })
 * })
 * ```
 */
export declare class TempDirectoryFixture {
    private dir;
    /**
     * Create a unique temporary directory
     * @returns Path to the created directory
     */
    setup(): Promise<string>;
    /**
     * Clean up the temporary directory
     * Logs cleanup failures for debugging
     */
    teardown(): Promise<void>;
    /**
     * Get a path within the temp directory
     * @param segments - Path segments to join
     * @returns Full path to the file/directory
     * @throws Error if setup() hasn't been called
     */
    getPath(...segments: string[]): string;
    /**
     * Check if the fixture has been initialized
     */
    isInitialized(): boolean;
}
/**
 * Mock helpers for creating typed mocks
 *
 * These helpers reduce the need for 'any' type assertions in tests
 */
/**
 * Create a mock function with proper type safety
 * @returns A mock function that can be configured
 */
export declare function createMockFunction<T extends (...args: any[]) => any>(implementation?: T): T & {
    mock: Mock<T>;
};
/**
 * Helper to create a partial mock (only mock specific methods)
 * @param obj - Object to create partial mock of
 * @param mockedMethods - Methods to mock
 * @returns Partial mock with specified methods mocked
 */
export declare function createPartialMock<T extends Record<string, any>>(obj: T, mockedMethods: (keyof T)[]): Partial<T>;
/**
 * Snapshot testing helpers
 */
/**
 * Fields that should be redacted from snapshots
 * These are typically unstable or environment-specific
 */
export declare const SNAPSHOT_REDACT_FIELDS: readonly ["id", "timestamp", "date", "created_at", "updated_at", "last_accessed", "filePath", "absolutePath"];
/**
 * Redact unstable fields from an object for snapshot testing
 * @param obj - Object to redact fields from
 * @param fields - Fields to redact (defaults to SNAPSHOT_REDACT_FIELDS)
 * @returns Object with unstable fields replaced with matchers
 */
export declare function redactUnstableFields<T extends Record<string, any>>(obj: T, fields?: (keyof T)[]): T;
/**
 * Async test helpers
 */
/**
 * Run an async test with timeout
 * @param fn - Test function to run
 * @param timeoutMs - Timeout in milliseconds (default: 5000)
 * @returns Promise that rejects if timeout
 */
export declare function withTimeout<T>(fn: () => Promise<T>, timeoutMs?: number): Promise<T>;
/**
 * Database test helpers
 */
/**
 * Generate a unique database name for testing
 * @returns Unique database name
 */
export declare function generateTestDbName(): string;
/**
 * Memory test helpers
 */
/**
 * Create a test memory entry with required fields
 * @param overrides - Fields to override from defaults
 * @returns Test memory entry
 */
export declare function createTestMemoryEntry(overrides?: Partial<{
    name: string;
    content: string;
    entry_type: string;
    status: string;
    priority: string;
    tags: string;
    created_at: number;
    updated_at: number;
    last_accessed: number;
}>): {
    name: string;
    content: string;
    entry_type: string;
    status: string;
    priority: string;
    tags: string;
    created_at: number;
    updated_at: number;
    last_accessed: number;
};
/**
 * Assert helpers (deprecated - use expect() directly in tests)
 */
//# sourceMappingURL=utils.d.ts.map