#!/usr/bin/env tsx

/**
 * Comprehensive test suite for file examples system
 * Run this separately: npm run test:file-examples
 */

import { runFileExamplesTests } from '../src/utils/test-file-examples';
import { testBlogPostIntegration } from '../src/utils/test-component-integration';

async function runComprehensiveTests() {
  console.log('🧪 Running Comprehensive File Examples Test Suite...\n');
  
  console.log('1️⃣  Testing File Examples Data System');
  console.log('─'.repeat(50));
  await runFileExamplesTests();
  
  console.log('\n2️⃣  Testing Blog Post Integration');
  console.log('─'.repeat(50));
  await testBlogPostIntegration();
  
  console.log('\n' + '='.repeat(50));
  console.log('🎉 ALL COMPREHENSIVE TESTS PASSED!');
  console.log('='.repeat(50));
  console.log('\nThe file examples system is fully functional:');
  console.log('  ✅ Data structure and manager');
  console.log('  ✅ Filtering by postSlug, groupId, and tags');
  console.log('  ✅ Copy and download functionality');
  console.log('  ✅ ZIP download for multiple files');
  console.log('  ✅ Integration with blog posts');
  console.log('  ✅ All blog posts have correct file examples');
}

runComprehensiveTests().catch(err => {
  console.error('❌ Test failed:', err);
  process.exit(1);
});