// engine/auditor-security/testing-checks.ts — Testing practices checks
export function checkTestingPractices(file, content, _lines) {
    const findings = [];
    if (!/\.(test|spec)\./.exec(file)) {
        return findings;
    }
    const skippedTests = content.matchAll(/(?:it|test|describe)\s*\.\s*(skip|only)\s*\(/g);
    for (const match of skippedTests) {
        findings.push({
            file,
            category: 'testing',
            severity: match[1] === 'only' ? 'error' : 'warning',
            rule: `test-${match[1]}`,
            message: `Test marked as .${match[1]}() — this should not be committed.`,
            suggestion: match[1] === 'only'
                ? 'Remove .only() before committing — it prevents other tests from running.'
                : 'Either fix the skipped test or remove it. Skipped tests add noise.',
        });
    }
    return findings;
}
//# sourceMappingURL=testing-checks.js.map