// test-pattern-scanner.ts — Sample real test structure from nearest test file (SPEC-696)
import { readFile } from 'node:fs/promises';
import { join } from 'node:path';
export async function scanTestPattern(projectPath, hint) {
    try {
        const absPath = join(projectPath, hint);
        const content = await readFile(absPath, 'utf8');
        const hasMock = content.includes('vi.mock(');
        const hasDoMock = content.includes('vi.doMock(');
        const describeMatch = /describe\(['"]([^'"]+)/.exec(content);
        return {
            relPath: hint,
            mockStyle: hasMock && hasDoMock ? 'mixed' : hasDoMock ? 'vi.doMock' : 'vi.mock',
            describeStructure: describeMatch?.[1] ?? '',
            hasBeforeEach: content.includes('beforeEach('),
        };
    }
    catch {
        return null;
    }
}
//# sourceMappingURL=test-pattern-scanner.js.map