// Test that globals are set up correctly by server.js // NOTE: Don't import server.js directly as it starts the server // Instead, we'll verify proxy.js works with the expected globals // Set up globals like server.js does import crypto from 'node:crypto'; globalThis.crypto = crypto; globalThis.config = { google: {}, server: {}, sitemap: {} }; // Mock config // Now import proxy to verify it uses crypto global import { generateRequestId } from './src/proxy.js'; const reqId = generateRequestId(); console.log('Generated request ID:', reqId); if (reqId && reqId.startsWith('req_')) { console.log('✅ proxy.js can use global crypto successfully!'); } else { console.log('❌ Failed to generate request ID'); process.exit(1); }