/** * Test utilities for VS Code MCP Server * Node.js 22 ES Modules compatible */ export interface TestStructure { [path: string]: string | TestStructure; } export interface TestWorkspace { path: string; cleanup: () => Promise; } /** * Test utilities class */ export declare class TestUtils { /** * Create a temporary workspace for testing */ static createTempWorkspace(suffix?: string): Promise; /** * Clean up temporary workspace */ static cleanupTempWorkspace(workspacePath: string): Promise; /** * Create file structure in workspace */ static createFileStructure(workspacePath: string, structure: TestStructure): Promise; /** * Read file content */ static readFile(filePath: string, encoding?: BufferEncoding): Promise; /** * Check if file exists */ static fileExists(filePath: string): Promise; /** * Check if directory exists */ static directoryExists(dirPath: string): Promise; /** * Get file stats */ static getFileStats(filePath: string): Promise<{ size: number; modified: Date; isDirectory: boolean; isFile: boolean; }>; /** * List directory contents */ static listDirectory(dirPath: string): Promise; /** * Create a mock workspace with common structure */ static createMockWorkspace(name?: string): Promise; /** * Wait for a specified amount of time */ static wait(ms: number): Promise; /** * Retry a function with exponential backoff */ static retry(fn: () => Promise, maxAttempts?: number, baseDelay?: number): Promise; /** * Generate random string */ static randomString(length?: number): string; /** * Clean up all test workspaces (useful for CI cleanup) */ static cleanupAllTestWorkspaces(): Promise; /** * Create mock WorkspaceService for testing */ static createMockWorkspaceService(workspacePath: string): any; /** * Create mock FileService for testing */ static createMockFileService(): any; /** * Create mock ProcessService for testing */ static createMockProcessService(): any; /** * Create mock GitService for testing */ static createMockGitService(): any; } /** * Test fixtures for common test data */ export declare class TestFixtures { static readonly SAMPLE_PYTHON_CODE: string; static readonly SAMPLE_JAVASCRIPT_CODE: string; static readonly SAMPLE_HTML: string; static readonly SAMPLE_CSS: string; static readonly SAMPLE_JSON_CONFIG: { name: string; version: string; description: string; main: string; scripts: { start: string; test: string; dev: string; }; dependencies: { express: string; }; devDependencies: { jest: string; nodemon: string; }; }; static readonly SAMPLE_MARKDOWN: string; /** * Get a complex project structure for testing */ static getComplexProjectStructure(): TestStructure; } //# sourceMappingURL=utils.d.ts.map