// SPEC-597-EXEMPT: canonical mapping (npm-package↔framework, keyword catalogue)
// — must enumerate framework names by design; no detection logic to migrate.
// engine/test-framework-detector/strategy.ts — SPEC-018
// Test strategy selection and full ecosystem detection.
import { detectTestingFramework, detectBDDFramework, detectPropertyTestFramework, detectLoadTestFramework, detectChaosFramework, detectVisualRegFramework, detectMutationFramework, detectTestDoublePattern, } from './detectors.js';
/**
 * Select the appropriate test strategy based on project type and stack.
 */
export function selectTestStrategy(projectType, stack) {
    const stackSet = new Set(stack.map((s) => s.toLowerCase()));
    // Microservices → Honeycomb (more integration, minimal unit and E2E)
    if (projectType === 'microservices' || stackSet.has('kubernetes') || stackSet.has('docker')) {
        return 'honeycomb';
    }
    // Frontend frameworks → Testing Trophy (more integration than unit)
    if (stackSet.has('react') ||
        stackSet.has('vue') ||
        stackSet.has('angular') ||
        stackSet.has('svelte') ||
        projectType === 'frontend') {
        return 'testing-trophy';
    }
    // Default backend → Testing Pyramid (majority unit)
    return 'testing-pyramid';
}
/**
 * Detect the full testing ecosystem from project deps and files.
 */
export function detectTestingEcosystem(deps, files, fileContents, projectType, stack) {
    return {
        framework: detectTestingFramework(deps),
        bddFramework: detectBDDFramework(files, deps),
        propertyFramework: detectPropertyTestFramework(deps),
        loadFramework: detectLoadTestFramework(files, deps),
        chaosFramework: detectChaosFramework(files, deps),
        visualRegFramework: detectVisualRegFramework(deps, files),
        mutationFramework: detectMutationFramework(files, deps),
        testDoublePattern: detectTestDoublePattern(deps, fileContents),
        testStrategy: selectTestStrategy(projectType, stack),
    };
}
//# sourceMappingURL=strategy.js.map