// Smoke test for SyncEngine.init() — confirms the startup check passes
// and the SyncEngine initializes without errors.
const path = require('path');
const DB_PATH = process.env.DB_PATH || path.join(__dirname, 'data', 'school.db');

console.log('[smoke] loading SyncEngine…');
try {
  const { getSyncEngine } = require('./src/services/SyncEngine');
  const engine = getSyncEngine();
  console.log('[smoke] SyncEngine initialized OK');
  console.log('[smoke] tablesToSync count:', engine.tablesToSync.length);
  console.log('[smoke] first 5:', engine.tablesToSync.slice(0, 5).join(', '));
  console.log('[smoke] last 5:', engine.tablesToSync.slice(-5).join(', '));
  process.exit(0);
} catch (err) {
  console.error('[smoke] FATAL:', err.message);
  process.exit(1);
}
