/** * Shared test utilities for consistent test patterns across the codebase. * * These utilities reduce code duplication and provide a standardized approach * to common test operations like ANSI stripping, file existence checks, and * temp directory management. */ /** * Strip ANSI escape codes from a string for plain text comparison. * * Note: This test utility uses a simple string parameter rather than named args * for ergonomics, since it's called frequently in test assertions. * * @param str - The string containing ANSI codes * * @returns The string with ANSI codes removed */ export declare const stripAnsi: (str: string) => string; /** * Check if a file or directory exists at the given path. * * @param args - The arguments object * @param args.filePath - The path to check * * @returns Promise resolving to true if the path exists, false otherwise */ export declare const pathExists: (args: { filePath: string; }) => Promise; /** * Context object returned by createTempTestContext for managing test directories. */ export type TempTestContext = { /** The root temporary directory for this test */ tempDir: string; /** The .claude directory within tempDir */ claudeDir: string; /** Clean up the temporary directory after the test */ cleanup: () => Promise; }; /** * Create a temporary test context with standardized directory structure. * * @param args - The arguments object * @param args.prefix - Prefix for the temp directory name (e.g., "profiles-test") * * @returns Promise resolving to a TempTestContext with tempDir, claudeDir, and cleanup function * * @example * ```typescript * let ctx: TempTestContext; * * beforeEach(async () => { * ctx = await createTempTestContext({ prefix: "my-test" }); * }); * * afterEach(async () => { * await ctx.cleanup(); * }); * ``` */ export declare const createTempTestContext: (args: { prefix: string; }) => Promise; //# sourceMappingURL=index.d.ts.map