12 lines
449 B
JavaScript
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);
|
|
}
|