/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { vi } from 'vitest';
/**
 * Creates a mock WorkspaceContext for testing
 */
export function createMockWorkspaceContext(rootDir, additionalDirs = []) {
    const allDirs = [rootDir, ...additionalDirs];
    const mockWorkspaceContext = {
        addDirectory: vi.fn(),
        getDirectories: vi
            .fn()
            .mockReturnValue(allDirs),
        isPathWithinWorkspace: vi
            .fn()
            .mockImplementation((path) => allDirs.some((dir) => path.startsWith(dir))),
    };
    return mockWorkspaceContext;
}
//# sourceMappingURL=mockWorkspaceContext.js.map