import { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
// Re-export base utilities for entry-point configs
export { defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, scratchGlobalSetup, scratchSetupFiles, };
/**
 * Creates a Vitest configuration for AWS CDK projects.
 *
 * Unlike the Jest equivalent, no `ts-jest` is needed — Vitest transforms
 * TypeScript natively via esbuild. CDK projects keep tests in a separate
 * test/ directory and collect coverage only from lib/ and util/ since
 * bin/ contains entry-point code with minimal logic.
 * @param options - Configuration options for threshold overrides
 * @param options.thresholds - Coverage thresholds in portable format
 * @returns Vitest UserConfig object with node environment and CDK-specific paths
 */
export const getCdkVitestConfig = ({ thresholds, } = {}) => ({
    test: {
        setupFiles: [...scratchSetupFiles()],
        globalSetup: [...scratchGlobalSetup()],
        globals: true,
        environment: "node",
        include: [
            "test/**/*.test.ts",
            "test/**/*.spec.ts",
            "test/**/*.integration-test.ts",
            "test/**/*.integration-spec.ts",
        ],
        exclude: [...defaultTestExclusions],
        testTimeout: 10000,
        coverage: {
            provider: "v8",
            include: ["lib/**/*.ts", "util/**/*.ts"],
            exclude: [...defaultCoverageExclusions],
            thresholds: mapThresholds(thresholds
                ? mergeThresholds(defaultThresholds, thresholds)
                : defaultThresholds),
        },
    },
});
//# sourceMappingURL=cdk.js.map