/** * Test: Hyperscript Multiple External SRC Files Bug Investigation * * HYPOTHESIS: Hyperscript 0.9.14 has issues when loading multiple *

Multi-File Hyperscript Test

Original
`; // We can't serve arbitrary HTML, but we can check the existing hyperscript files console.log(' Checking hyperscript file contents from server...\n'); // Fetch each hyperscript file const hsFiles = [ '/static/hyperscript/utils._hs', '/static/hyperscript/toggles._hs', '/static/hyperscript/hover-sync._hs', '/static/hyperscript/keyboard._hs' ]; for (const file of hsFiles) { try { const response = await page.evaluate(async (url) => { const res = await fetch(url); const text = await res.text(); return { status: res.status, contentType: res.headers.get('content-type'), length: text.length, preview: text.substring(0, 200) }; }, BASE_URL + file); console.log(` ${file}:`); console.log(` Status: ${response.status}, Size: ${response.length} chars`); console.log(` Content-Type: ${response.contentType}`); } catch (err) { console.log(` ${file}: โŒ Error - ${err.message}`); } } await testPage.close(); // ===================================================================== // SUMMARY // ===================================================================== console.log('\n' + '=' .repeat(70)); console.log('๐Ÿ“Š TEST SUMMARY\n'); const allWorking = shortcutsModalOpen && vKeyWorks && (scrollDownResult !== null) && (scrollUpResult !== null); if (allWorking) { console.log(' โœ… All hyperscript features are working!'); console.log(' โœ… Both inline and external file functions work correctly.'); console.log('\n CONCLUSION: No multi-file bug detected in current setup.'); console.log(' The previous errors may have been caused by:'); console.log(' - Syntax errors in the refactored code'); console.log(' - Order of script loading'); console.log(' - Content-Type headers for ._hs files'); } else { console.log(' โš ๏ธ Some features not working. Check errors above.'); console.log('\n This may indicate a multi-file loading issue.'); } console.log('\n Console errors detected: ' + consoleMessages.filter(m => m.type === 'error').length); console.log(' Page errors detected: ' + errors.length); if (errors.length > 0) { console.log('\n Error details:'); errors.forEach((err, i) => console.log(` ${i + 1}. ${err}`)); } console.log('\n' + '=' .repeat(70)); console.log('\nBrowser staying open for manual inspection...'); console.log('Press Ctrl+C when done.\n'); // Keep browser open for inspection await new Promise(() => {}); } catch (error) { console.error('Test error:', error); await browser.close(); process.exit(1); } } testMultiFileSrcBug();