/** * TestPlacement Types * * @description * テスト配置検証の型定義 * * @see TSK-FR-048 - TestPlacement型定義 * @see REQ-FR-046〜050 - TestPlacementValidator * @trace DES-MUSUBIX-FR-001 DES-CODEGRAPH-001 */ /** * テスト配置のステータス */ export type PlacementStatus = 'valid' | 'warning' | 'invalid'; /** * テストファイルの種類 */ export type TestFileType = 'unit' | 'integration' | 'e2e' | 'snapshot' | 'unknown'; /** * テスト配置ルール */ export interface PlacementRule { readonly id: string; readonly name: string; readonly description: string; readonly pattern: string; readonly expectedLocation: string; readonly severity: 'error' | 'warning' | 'info'; readonly enabled: boolean; } /** * テスト配置情報 */ export interface TestPlacement { readonly testFilePath: string; readonly sourceFilePath: string | null; readonly type: TestFileType; readonly status: PlacementStatus; readonly violations: readonly PlacementViolation[]; readonly suggestions: readonly string[]; readonly metadata?: Readonly>; } /** * 配置違反 */ export interface PlacementViolation { readonly ruleId: string; readonly ruleName: string; readonly message: string; readonly severity: 'error' | 'warning' | 'info'; readonly suggestedPath?: string; } /** * 配置検証結果 */ export interface PlacementValidationResult { readonly isValid: boolean; readonly placements: readonly TestPlacement[]; readonly summary: PlacementSummary; readonly timestamp: number; } /** * 配置サマリー */ export interface PlacementSummary { readonly totalTests: number; readonly validCount: number; readonly warningCount: number; readonly invalidCount: number; readonly byType: Readonly>; readonly coverageEstimate: number; } /** * TestPlacementValidator設定 */ export interface TestPlacementConfig { readonly rules: readonly PlacementRule[]; readonly ignorePatterns: readonly string[]; readonly strictMode: boolean; } /** * デフォルトの配置ルール */ export declare const DEFAULT_PLACEMENT_RULES: readonly PlacementRule[]; /** * デフォルト設定 */ export declare const DEFAULT_TEST_PLACEMENT_CONFIG: TestPlacementConfig; /** * テストファイルタイプを推定 */ export declare function inferTestFileType(filePath: string): TestFileType; /** * ソースファイルパスを推定 */ export declare function inferSourceFilePath(testFilePath: string): string | null; /** * TestPlacementを作成 */ export declare function createTestPlacement(testFilePath: string, violations?: readonly PlacementViolation[], suggestions?: readonly string[]): TestPlacement; /** * 配置サマリーを計算 */ export declare function calculatePlacementSummary(placements: readonly TestPlacement[]): PlacementSummary; //# sourceMappingURL=TestPlacement.d.ts.map