/** * Shared test utilities for CLI command tests. */ import { FileStorage } from "../core/storage/index.js"; export { setupGitHubMock, cleanupGitHubMock, createIssueFixture, createTask, createStore, createArchivedTask, type GitHubIssueFixture, type GitHubMock, } from "../test-utils/github-mock.js"; export { setupShortcutMock, cleanupShortcutMock, createStoryFixture, createWorkflowFixture, createTeamFixture, createMemberFixture, type ShortcutStoryFixture, type ShortcutStoryLinkFixture, type ShortcutMock, } from "../test-utils/shortcut-mock.js"; export declare const TASK_ID_REGEX: RegExp; export interface CapturedOutput { stdout: string[]; stderr: string[]; restore: () => void; } export declare function captureOutput(): CapturedOutput; export declare function createTempStorage(): { storage: FileStorage; cleanup: () => void; }; /** * Create a temporary git repository with dex storage for testing. * Returns storage pointing to .dex in the git repo. */ export declare function createTempGitStorage(): { storage: FileStorage; gitRoot: string; cleanup: () => void; }; export interface TestSubtask { id: string; name: string; description?: string; completed?: boolean; result?: string | null; priority?: number; parentId?: string; created_at?: string; updated_at?: string; completed_at?: string | null; commit?: { sha: string; message?: string; branch?: string; url?: string; timestamp?: string; }; } export interface TestRootTaskMetadata { id?: string; priority?: number; completed?: boolean; result?: string | null; created_at?: string; updated_at?: string; completed_at?: string | null; commit?: { sha: string; message?: string; branch?: string; url?: string; timestamp?: string; }; } /** * Create a comprehensive dex issue body with full metadata for round-trip testing. */ export declare function createFullDexIssueBody(options: { context?: string; rootMetadata?: TestRootTaskMetadata; subtasks?: TestSubtask[]; }): string; /** * Create legacy format issue body (old sync format without root metadata). */ export declare function createLegacyIssueBody(options: { context: string; taskId?: string; }): string; import { vi } from "vitest"; export interface CliTestFixture { storage: FileStorage; output: CapturedOutput; mockExit: ReturnType; cleanup: () => void; } /** * Create a complete CLI test fixture with storage, output capture, and mocked process.exit. * Use in beforeEach and call fixture.cleanup() in afterEach. */ export declare function createCliTestFixture(): CliTestFixture; /** * Create a task via CLI and return its ID. * Clears output after capturing the ID. */ export declare function createTaskAndGetId(fixture: CliTestFixture, name: string, options?: { parent?: string; blockedBy?: string; description?: string; }): Promise; import { SyncRegistry } from "../core/sync/index.js"; export interface TestSyncRegistryOptions { github?: { owner?: string; repo?: string; token?: string; }; shortcut?: { workspace?: string; team?: string; token?: string; }; } /** * Create a SyncRegistry with configured services for testing. * Services are created directly without validation, suitable for use with mocks. */ export declare function createTestSyncRegistry(options?: TestSyncRegistryOptions): SyncRegistry; //# sourceMappingURL=test-helpers.d.ts.map