// Test setup file // Polyfills and global setup go here // Ensure crypto is available in test environment if (typeof global.crypto === 'undefined') { const { webcrypto } = require('crypto'); (global as any).crypto = webcrypto; } if (typeof global.btoa === 'undefined') { global.btoa = (str: string) => Buffer.from(str, 'binary').toString('base64'); } if (typeof global.atob === 'undefined') { global.atob = (str: string) => Buffer.from(str, 'base64').toString('binary'); }