import { generateTests } from "../../../../../scripts/generate-tests.js";
function generateTestSuite(context) {
  const { spec, implType, outputDir } = context;
  if (!spec) {
    throw new Error("Specification is required in template context");
  }
  const config = implType.configuration || {};
  const options = {
    testFramework: config.testFramework || "vitest",
    generateUnitTests: config.generateUnitTests !== false,
    generateIntegrationTests: config.generateIntegrationTests !== false,
    generateE2ETests: config.generateE2ETests !== false,
    generateFixtures: config.generateFixtures !== false,
    generateMocks: config.generateMocks !== false
  };
  const result = generateTests(spec, outputDir || "./tests", options);
  return JSON.stringify({
    message: "Test suite generated successfully",
    unitTests: result.unitTests,
    integrationTests: result.integrationTests,
    e2eTests: result.e2eTests,
    fixtureCount: result.fixtureCount,
    mockCount: result.mockCount,
    outputDir: result.outputDir,
    files: result.files
  }, null, 2);
}
export {
  generateTestSuite as default
};
