nexurejs
Version:
High-performance Node.js framework with 100% native module success rate. Features crypto, caching, WebSocket, routing, and production-ready stability.
7 lines (6 loc) โข 1.74 kB
JavaScript
const native = require('./build/Release/nexurejs_native.node'); console.log('๐ฅ COMPREHENSIVE INTEGRATION TEST ๐ฅ'); console.log('Testing all 20 modules working together
'); async function runIntegrationTests() { console.log('๐งช MODULE INITIALIZATION'); const hashFunc = new native.HashFunctions(); const router = new native.RadixRouter(); const cache = new native.LRUCache(1000); const jsonProcessor = new native.JsonProcessor(); const webSocket = new native.WebSocket(); console.log('โ
All modules initialized'); console.log('
๐งช CRYPTO + CACHE + JSON TEST'); const password = 'test123'; const hashed = hashFunc.hash(password, 'sha256'); const testObj = { user: 'test', pass: hashed }; const json = jsonProcessor.stringify(testObj); cache.set('user:test', json); const cached = cache.get('user:test'); const parsed = jsonProcessor.parse(cached); console.log(' Crypto+Cache+JSON:', parsed.user === 'test' ? 'โ
' : 'โ'); console.log('
๐งช ROUTER + WEBSOCKET TEST'); router.add('/api/test', 'GET'); const route = router.find('/api/test', 'GET'); webSocket.start(8082); webSocket.broadcast('test message'); const metrics = webSocket.getMetrics(); webSocket.stop(); console.log(' Router+WebSocket:', route && metrics.isRunning === false ? 'โ
' : 'โ'); console.log('
๐งช PERFORMANCE TEST'); const start = process.hrtime.bigint(); for(let i=0; i<1000; i++) { hashFunc.hash('test'+i, 'sha256'); cache.set('key'+i, 'val'+i); router.find('/api/test', 'GET'); } const end = process.hrtime.bigint(); const duration = Number(end-start)/1000000; console.log(' 1000 combined ops in', duration.toFixed(2), 'ms'); console.log('
๐ INTEGRATION SUCCESS! All modules working together! ๐'); return true; } runIntegrationTests();