Files
kme_content_adapter/test-crypto-global.mjs
2026-04-22 18:05:20 -05:00

12 lines
449 B
JavaScript

// Test that crypto is available globally (Node.js Web Crypto API)
// Note: crypto is natively available in Node.js, no need to import server.js
// Should have crypto available
if (globalThis.crypto && globalThis.crypto.randomUUID) {
const uuid = globalThis.crypto.randomUUID();
process.stdout.write(`✅ crypto is available globally: ${uuid}\n`);
} else {
process.stdout.write('❌ crypto is NOT available globally\n');
process.exit(1);
}