import { ComplianceTester } from './compliance-tester'; import { logger } from '../utils/logger'; async function main() { try { logger.info('šŸš€ Starting Fake Tavus Server Compliance Tests'); // Create compliance tester const tester = new ComplianceTester(); // Run all tests const results = await tester.runAllTests(); // Generate and save report tester.saveResults('./compliance-test-results.json'); // Print summary const passed = results.filter(r => r.passed).length; const total = results.length; const successRate = total > 0 ? (passed / total * 100).toFixed(2) : '0'; logger.info(`\nšŸ“Š Test Summary:`); logger.info(` Total Tests: ${total}`); logger.info(` Passed: ${passed}`); logger.info(` Failed: ${total - passed}`); logger.info(` Success Rate: ${successRate}%`); if (passed === total) { logger.info('\nšŸŽ‰ All compliance tests passed! The fake server is fully compliant with the real Tavus API.'); process.exit(0); } else { logger.warn('\nāš ļø Some tests failed. Check the detailed report for more information.'); process.exit(1); } } catch (_error) { logger.error('āŒ Compliance test runner failed:', error); process.exit(1); } } // Run the tests void main();